Merge pull request #672 from tomdxw/fix-search-form-bug

Allow get_search_form() to be called more than once per request
This commit is contained in:
Ben Word
2013-02-05 14:20:07 -08:00

View File

@@ -513,8 +513,10 @@ add_filter('request', 'roots_request_filter');
/**
* Tell WordPress to use searchform.php from the templates/ directory
*/
function roots_get_search_form() {
locate_template('/templates/searchform.php', true, true);
function roots_get_search_form($argument) {
if ($argument === '') {
locate_template('/templates/searchform.php', true, false);
}
}
add_filter('get_search_form', 'roots_get_search_form');