Search form support for WordPress 3.6+
This commit is contained in:
@@ -256,11 +256,11 @@ function roots_request_filter($query_vars) {
|
||||
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. Requires WordPress 3.6+
|
||||
*/
|
||||
function roots_get_search_form($argument) {
|
||||
if ($argument === '') {
|
||||
locate_template('/templates/searchform.php', true, false);
|
||||
}
|
||||
function roots_get_search_form($form) {
|
||||
$form = '';
|
||||
locate_template('/templates/searchform.php', true, false);
|
||||
return $form;
|
||||
}
|
||||
add_filter('get_search_form', 'roots_get_search_form');
|
||||
|
||||
Reference in New Issue
Block a user