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

git-svn-id: http://svn.automattic.com/wordpress/trunk@11430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-05-22 16:04:49 +00:00
parent 5ef0b8278e
commit 7bada8f202

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>