Ticket #14851: 14851.3.patch
File 14851.3.patch, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-includes/general-template.php
198 198 * 199 199 * @since 2.7.0 200 200 * 201 * @param boolean $echo Default to echo and not return the form.201 * @param boolean|string $echo Default to echo and not return the form or if string returns the specialised searchform 202 202 * @return string|null String when retrieving, null when displaying or if searchform.php exists. 203 203 */ 204 204 function get_search_form( $echo = true ) { … … 224 224 */ 225 225 $format = apply_filters( 'search_form_format', $format ); 226 226 227 $search_form_template = locate_template( 'searchform.php' ); 227 $templates = array(); 228 $name = $echo; 229 if ( is_string( $name ) ) { 230 $templates[] = "searchform-{$name}.php"; 231 } 232 $templates[] = 'searchform.php'; 233 $search_form_template = locate_template( $templates ); 228 234 if ( '' != $search_form_template ) { 229 235 ob_start(); 230 236 require( $search_form_template );