Make WordPress Core

Ticket #34017: 34017.3.patch

File 34017.3.patch, 2.3 KB (added by leemon, 9 years ago)

Updated method descriptions

  • src/wp-includes/widgets/class-wp-widget-calendar.php

     
    2626         */
    2727        private static $instance = 0;
    2828
     29        /**
     30         * Creates a new Calendar widget instance.
     31         *
     32         * @since 2.8.0
     33         * @access public
     34         */
    2935        public function __construct() {
    3036                $widget_ops = array('classname' => 'widget_calendar', 'description' => __( 'A calendar of your site’s Posts.') );
    3137                parent::__construct('calendar', __('Calendar'), $widget_ops);
     
    3238        }
    3339
    3440        /**
    35          * @param array $args
    36          * @param array $instance
     41         * Echoes the current Calendar widget instance 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.
    3749         */
    3850        public function widget( $args, $instance ) {
    3951                /** This filter is documented in src/wp-includes/widgets/class-wp-widget-pages.php */
     
    5668        }
    5769
    5870        /**
    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         * 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.
    6284         */
    6385        public function update( $new_instance, $old_instance ) {
    6486                $instance = $old_instance;
     
    6890        }
    6991
    7092        /**
    71          * @param array $instance
     93         * Outputs the current Calendar widget instance settings update form.
     94         *
     95         * @since 2.8.0
     96         * @access public
     97         *
     98         * @param array $instance Current settings.
    7299         */
    73100        public function form( $instance ) {
    74101                $instance = wp_parse_args( (array) $instance, array( 'title' => '' ) );