diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index e8bd52cc9..100c5752c 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -179,13 +179,33 @@ class WP_Widget_Search extends WP_Widget { function widget( $args, $instance ) { extract($args); + $title = apply_filters('widget_title', $instance['title']); + echo $before_widget; + if ( $title ) + echo $before_title . $title . $after_title; // Use current theme search form if it exists get_search_form(); echo $after_widget; } + + function form( $instance ) { + $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); + $title = $instance['title']; +?> +

+ '')); + $instance['title'] = strip_tags($new_instance['title']); + return $instance; + } + } /**