Allow to switch get_search_form() to HTML5 with an add_theme_support() call. fixes #23850.
git-svn-id: https://develop.svn.wordpress.org/trunk@24225 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0ac97e433c
commit
aaec6a462a
|
@ -155,7 +155,8 @@ function get_template_part( $slug, $name = null ) {
|
||||||
function get_search_form( $echo = true ) {
|
function get_search_form( $echo = true ) {
|
||||||
do_action( 'pre_get_search_form' );
|
do_action( 'pre_get_search_form' );
|
||||||
|
|
||||||
$format = apply_filters( 'search_form_format', 'xhtml' );
|
$format = ( current_theme_supports( 'html5-search-form' ) ) ? 'html5' : 'xhtml';
|
||||||
|
$format = apply_filters( 'search_form_format', $format );
|
||||||
|
|
||||||
$search_form_template = locate_template( 'searchform.php' );
|
$search_form_template = locate_template( 'searchform.php' );
|
||||||
if ( '' != $search_form_template ) {
|
if ( '' != $search_form_template ) {
|
||||||
|
|
Loading…
Reference in New Issue