- Timestamp:
- 09/27/2015 01:06:20 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets/class-wp-widget-calendar.php
r34430 r34619 27 27 private static $instance = 0; 28 28 29 /** 30 * Sets up a new Calendar widget instance. 31 * 32 * @since 2.8.0 33 * @access public 34 */ 29 35 public function __construct() { 30 36 $widget_ops = array('classname' => 'widget_calendar', 'description' => __( 'A calendar of your site’s Posts.') ); … … 33 39 34 40 /** 35 * @param array $args 36 * @param array $instance 41 * Outputs the content for the current Calendar widget instance. 42 * 43 * @since 2.8.0 44 * @access public 45 * 46 * @param array $args Display arguments including 'before_title', 'after_title', 47 * 'before_widget', and 'after_widget'. 48 * @param array $instance The settings for the particular instance of the widget. 37 49 */ 38 50 public function widget( $args, $instance ) { … … 57 69 58 70 /** 59 * @param array $new_instance 60 * @param array $old_instance 61 * @return array 71 * Handles updating settings for the current Calendar widget instance. 72 * 73 * @since 2.8.0 74 * @access public 75 * 76 * @param array $new_instance New settings for this instance as input by the user via 77 * WP_Widget::form(). 78 * @param array $old_instance Old settings for this instance. 79 * @return array Updated settings to save. 62 80 */ 63 81 public function update( $new_instance, $old_instance ) { … … 69 87 70 88 /** 71 * @param array $instance 89 * Outputs the settings form for the Calendar widget. 90 * 91 * @since 2.8.0 92 * @access public 93 * 94 * @param array $instance Current settings. 72 95 */ 73 96 public function form( $instance ) { 74 97 $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) ); 75 98 $title = sanitize_text_field( $instance['title'] ); 76 ?>99 ?> 77 100 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 78 101 <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); ?>" /></p> 79 <?php102 <?php 80 103 } 81 104 }
Note: See TracChangeset
for help on using the changeset viewer.