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:
@@ -513,8 +513,10 @@ add_filter('request', 'roots_request_filter');
|
|||||||
/**
|
/**
|
||||||
* Tell WordPress to use searchform.php from the templates/ directory
|
* Tell WordPress to use searchform.php from the templates/ directory
|
||||||
*/
|
*/
|
||||||
function roots_get_search_form() {
|
function roots_get_search_form($argument) {
|
||||||
locate_template('/templates/searchform.php', true, true);
|
if ($argument === '') {
|
||||||
|
locate_template('/templates/searchform.php', true, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('get_search_form', 'roots_get_search_form');
|
add_filter('get_search_form', 'roots_get_search_form');
|
||||||
|
|||||||
Reference in New Issue
Block a user