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 { ?> +
-
+ -
- - - +