Ticket #34025: 34025.2.patch
File 34025.2.patch, 2.3 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-search.php
16 16 */ 17 17 class WP_Widget_Search extends WP_Widget { 18 18 19 /** 20 * Creates a new Search widget instance. 21 * 22 * @since 2.8.0 23 * @access public 24 */ 19 25 public function __construct() { 20 26 $widget_ops = array('classname' => 'widget_search', 'description' => __( "A search form for your site.") ); 21 27 parent::__construct( 'search', _x( 'Search', 'Search widget' ), $widget_ops ); … … 22 28 } 23 29 24 30 /** 25 * @param array $args 26 * @param array $instance 31 * Echoes the current Search widget instance content. 32 * 33 * @since 2.8.0 34 * @access public 35 * 36 * @param array $args Display arguments including 'before_title', 'after_title', 37 * 'before_widget', and 'after_widget'. 38 * @param array $instance The settings for the particular instance of the widget. 27 39 */ 28 40 public function widget( $args, $instance ) { 29 41 /** This filter is documented in src/wp-includes/widgets/class-wp-widget-pages.php */ … … 41 53 } 42 54 43 55 /** 44 * @param array $instance 56 * Outputs the current Search widget instance settings update form. 57 * 58 * @since 2.8.0 59 * @access public 60 * 61 * @param array $instance Current settings. 45 62 */ 46 63 public function form( $instance ) { 47 64 $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); … … 52 69 } 53 70 54 71 /** 55 * @param array $new_instance 56 * @param array $old_instance 57 * @return array 72 * Handles updating settings for the current Search widget instance. 73 * 74 * This function should check that `$new_instance` is set correctly. The newly-calculated 75 * value of `$instance` should be returned. If false is returned, the instance won't be 76 * saved/updated. 77 * 78 * @since 2.8.0 79 * @access public 80 * 81 * @param array $new_instance New settings for this instance as input by the user via 82 * WP_Widget::form(). 83 * @param array $old_instance Old settings for this instance. 84 * @return array Settings to save or bool false to cancel saving. 58 85 */ 59 86 public function update( $new_instance, $old_instance ) { 60 87 $instance = $old_instance;