summaryrefslogtreecommitdiffstats
path: root/wp-includes/widgets.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-07-04 14:37:48 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-07-04 14:37:48 +0000
commite2238d665f51ad4e37b866c9e0499d9571af0c2f (patch)
tree1dc147d9c39b75dc18cb716213e0f57675097646 /wp-includes/widgets.php
parentb34249168a364f1eef7806abc65fcdc5304578f1 (diff)
downloadwordpress-mu-e2238d665f51ad4e37b866c9e0499d9571af0c2f.tar.gz
wordpress-mu-e2238d665f51ad4e37b866c9e0499d9571af0c2f.tar.xz
wordpress-mu-e2238d665f51ad4e37b866c9e0499d9571af0c2f.zip
WP Merge with revision 8255
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1350 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/widgets.php')
-rw-r--r--wp-includes/widgets.php23
1 files changed, 14 insertions, 9 deletions
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index fd0bc3d..1dd8bd3 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);
-?>
- <?php echo $before_widget; ?>
- <form id="searchform" method="get" action="<?php bloginfo('home'); ?>">
- <div>
+ $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 { ?>
+ <form id="searchform" method="get" action="<?php bloginfo('url'); ?>/"><div>
<label class="hidden" for="s"><?php _e('Search for:'); ?></label>
- <input type="text" name="s" id="s" size="15" /><br />
+ <input type="text" name="s" id="s" size="15" value="<?php the_search_query(); ?>" />
<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
- </div>
- </form>
- <?php echo $after_widget; ?>
-<?php
+ </div></form>
+ <?php }
+
+ echo $after_widget;
}
function wp_widget_archives($args) {