WordPress.org

Make WordPress Core

Ticket #23850: 23850.diff

File 23850.diff, 1.1 KB (added by DrewAPicture, 5 years ago)
  • wp-includes/general-template.php

     
    147147 *
    148148 * @since 2.7.0
    149149 * @param boolean $echo Default to echo and not return the form.
    150  * @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.
     150 * @param string $deprecated Deprecated.
    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, $deprecated = '' ) {
     154        if ( ! empty( $deprecated ) )
     155                _deprecated_argument( __FUNCTION__, '3.6', __( 'Use the <code>search_form_format</code> filter instead.' ) );
     156
    154157        do_action( 'get_search_form' );
    155158
     159        $format = apply_filters( 'search_form_format', 'xhtml' );
     160
    156161        $search_form_template = locate_template( 'searchform.php' );
    157162        if ( '' != $search_form_template ) {
    158163                ob_start();