Allow get_search_form() to be called more than once per request

This commit is contained in:
Tom Adams
2013-02-05 16:33:40 -05:00
parent eb9f9896a4
commit 43a0f3c24f

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');