diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 999aa0f2aa..36713a04a9 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -147,29 +147,34 @@ function get_template_part( $slug, $name = null ) { * * @since 2.7.0 * @param boolean $echo Default to echo and not return the form. + * @param string $format Which type to use for the search field. If set to 'html5' it changes to search input type and adds placeholder text. * @return string|null String when retrieving, null when displaying or if searchform.php exists. */ -function get_search_form($echo = true) { +function get_search_form( $echo = true, $format = 'xhtml' ) { do_action( 'get_search_form' ); - $search_form_template = locate_template('searchform.php'); + $search_form_template = locate_template( 'searchform.php' ); if ( '' != $search_form_template ) { ob_start(); - require($search_form_template); + require( $search_form_template ); $form = ob_get_clean(); } else { - $form = ''; } if ( $echo ) - echo apply_filters('get_search_form', $form); + echo apply_filters( 'get_search_form', $form ); else - return apply_filters('get_search_form', $form); + return apply_filters( 'get_search_form', $form ); } /**