mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
+2
-12
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user