Allow multiple search form templates. Props mtdewvirus. fixes #9908

git-svn-id: https://develop.svn.wordpress.org/trunk@11430 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-05-22 16:04:49 +00:00
parent 2d6a9356d4
commit 783f4ea189
1 changed files with 4 additions and 1 deletions

View File

@ -115,8 +115,11 @@ function get_sidebar( $name = null ) {
function get_search_form() {
do_action( 'get_search_form' );
if ( '' != locate_template(array('searchform.php'), true) )
$search_form_template = locate_template(array('searchform.php'));
if ( '' != $search_form_template ) {
require($search_form_template);
return;
}
$form = '<form role="search" method="get" id="searchform" action="' . get_option('home') . '/" >
<div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>