WordPress.org

Make WordPress Core

Ticket #23850: searchform_format.patch

File searchform_format.patch, 908 bytes (added by WraithKenny, 16 months ago)
  • wp-includes/general-template.php

     wp-includes/general-template.php | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
    index 89ebaeb..38579ed 100644
    a b function get_template_part( $slug, $name = null ) { 
    150150 * @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. 
    151151 * @return string|null String when retrieving, null when displaying or if searchform.php exists. 
    152152 */ 
    153 function get_search_form( $echo = true, $format = 'xhtml' ) { 
     153function get_search_form( $echo = true ) { 
    154154        do_action( 'get_search_form' ); 
     155         
     156        $format = apply_filters( 'search_form_format', 'xhtml' ); 
    155157 
    156158        $search_form_template = locate_template( 'searchform.php' ); 
    157159        if ( '' != $search_form_template ) {