WordPress.org

Make WordPress Core

Ticket #16541: 16541.compact.diff

File 16541.compact.diff, 561 bytes (added by kawauso, 11 years ago)
  • wp-includes/general-template.php

     
    153153
    154154        $search_form_template = locate_template('searchform.php');
    155155        if ( '' != $search_form_template ) {
     156                if ( !$echo )
     157                        ob_start();
    156158                require($search_form_template);
    157                 return;
     159                return $echo ? '' : ob_get_clean();
    158160        }
    159161
    160162        $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >