Ticket #34017: 34017.2.patch
File 34017.2.patch, 2.2 KB (added by , 9 years ago) |
---|
-
src/wp-includes/widgets/class-wp-widget-calendar.php
26 26 */ 27 27 private static $instance = 0; 28 28 29 /** 30 * PHP5 constructor. 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.') ); 31 37 parent::__construct('calendar', __('Calendar'), $widget_ops); … … 32 38 } 33 39 34 40 /** 35 * @param array $args 36 * @param array $instance 41 * Echoes the widget content. 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 ) { 39 51 /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */ … … 56 68 } 57 69 58 70 /** 59 * @param array $new_instance 60 * @param array $old_instance 61 * @return array 71 * Updates a particular instance of a widget. 72 * 73 * This function should check that `$new_instance` is set correctly. The newly-calculated 74 * value of `$instance` should be returned. If false is returned, the instance won't be 75 * saved/updated. 76 * 77 * @since 2.8.0 78 * @access public 79 * 80 * @param array $new_instance New settings for this instance as input by the user via 81 * WP_Widget::form(). 82 * @param array $old_instance Old settings for this instance. 83 * @return array Settings to save or bool false to cancel saving. 62 84 */ 63 85 public function update( $new_instance, $old_instance ) { 64 86 $instance = $old_instance; … … 68 90 } 69 91 70 92 /** 71 * @param array $instance 93 * Outputs the settings update form. 94 * 95 * @since 2.8.0 96 * @access public 97 * 98 * @param array $instance Current settings. 72 99 */ 73 100 public function form( $instance ) { 74 101 $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );