From 43a0f3c24ff71c55a78aefee7a9a1ee074f5c80f Mon Sep 17 00:00:00 2001 From: Tom Adams Date: Tue, 5 Feb 2013 16:33:40 -0500 Subject: [PATCH] Allow get_search_form() to be called more than once per request --- lib/cleanup.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/cleanup.php b/lib/cleanup.php index 0aa4704..eed98d2 100644 --- a/lib/cleanup.php +++ b/lib/cleanup.php @@ -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');