From 3ceeaa6252f9d23b40870c2577b812ff0207e71f Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 3 Jul 2008 17:03:37 +0000 Subject: [PATCH] Use searchform.php for search widget, if available. Props ionfish. fixes #5567 git-svn-id: http://svn.automattic.com/wordpress/trunk@8250 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/widgets.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index fd0bc3d2a2..1dd8bd35a5 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -461,17 +461,22 @@ function wp_widget_links($args) { function wp_widget_search($args) { extract($args); -?> - -
-
+ $searchform_template = get_template_directory() . '/searchform.php'; + + echo $before_widget; + + // Use current theme search form if it exists + if ( file_exists($searchform_template) ) { + include_once($searchform_template); + } else { ?> +
-
+ -
- - - +