get_search_form from technosailor. fixes #7910

git-svn-id: https://develop.svn.wordpress.org/trunk@9234 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-10-17 20:39:56 +00:00
parent 202c2fc0be
commit 5413ecde13
8 changed files with 23 additions and 29 deletions
+2 -12
View File
@@ -763,21 +763,11 @@ 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 { ?>
<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" value="<?php the_search_query(); ?>" />
<input type="submit" value="<?php echo attribute_escape(__('Search')); ?>" />
</div></form>
<?php }
get_search_form();
echo $after_widget;
}