From 49f185ae099b8323fd928b511a95396a12a0192e Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 5 Apr 2013 00:26:53 +0000 Subject: [PATCH] In the HTML outputted from get_search_form(): remove incrementing the IDs for XHTML after the first call, remove the
wrapper for HTML5. Props obenland, props bpetty. Fixes #16539 git-svn-id: http://core.svn.wordpress.org/trunk@23916 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 37 +++++++++++--------------------- 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 5598f9cb1e..72a4898eb5 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -153,17 +153,10 @@ function get_template_part( $slug, $name = null ) { * @return string|null String when retrieving, null when displaying or if searchform.php exists. */ function get_search_form( $echo = true ) { - static $search_form_counter = 0; - do_action( 'pre_get_search_form' ); $format = apply_filters( 'search_form_format', 'xhtml' ); - // Initialize the values - $form_id = $search_form_counter ? '' : ' id="searchform"'; - $submit_id = $search_form_counter ? '' : ' id="searchsubmit"'; - $text_id = $search_form_counter ? 's-' . $search_form_counter : 's'; - $search_form_template = locate_template( 'searchform.php' ); if ( '' != $search_form_template ) { ob_start(); @@ -171,21 +164,19 @@ function get_search_form( $echo = true ) { $form = ob_get_clean(); } else { if ( 'html5' == $format ) { - $form = ''; - } else { - $form = ''; + } else { + $form = ''; } } @@ -194,8 +185,6 @@ function get_search_form( $echo = true ) { if ( null === $result ) $result = $form; - $search_form_counter++; - if ( $echo ) echo $result; else