Changeset 34611
- Timestamp:
- 09/27/2015 12:36:26 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-search.php
r34438 r34611 17 17 class WP_Widget_Search extends WP_Widget { 18 18 19 /** 20 * Sets up 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.") ); … … 23 29 24 30 /** 25 * @param array $args 26 * @param array $instance 31 * Outputs the content for the current Search widget instance. 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 Settings for the current Search widget instance. 27 39 */ 28 40 public function widget( $args, $instance ) { … … 42 54 43 55 /** 44 * @param array $instance 56 * Outputs the settings form for the Search widget. 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' => '') ); 48 65 $title = $instance['title']; 49 ?>66 ?> 50 67 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></label></p> 51 <?php68 <?php 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 * @since 2.8.0 75 * @access public 76 * 77 * @param array $new_instance New settings for this instance as input by the user via 78 * WP_Widget::form(). 79 * @param array $old_instance Old settings for this instance. 80 * @return array Updated settings. 58 81 */ 59 82 public function update( $new_instance, $old_instance ) {
Note: See TracChangeset
for help on using the changeset viewer.