Make WordPress Core

Ticket #34018: 34018.patch

File 34018.patch, 2.2 KB (added by leemon, 10 years ago)

Improve method documentation

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

     
    1717 */
    1818class WP_Widget_Categories extends WP_Widget {
    1919
     20        /**
     21         * PHP5 constructor.
     22         *
     23         * @since 2.8.0
     24         * @access public
     25         */
    2026        public function __construct() {
    2127                $widget_ops = array( 'classname' => 'widget_categories', 'description' => __( "A list or dropdown of categories." ) );
    2228                parent::__construct('categories', __('Categories'), $widget_ops);
     
    2329        }
    2430
    2531        /**
    26          * @staticvar bool $first_dropdown
     32         * Echoes the widget content.
    2733         *
    28          * @param array $args
    29          * @param array $instance
     34         * @since 2.8.0
     35         * @access public
     36         *
     37         * @param array $args     Display arguments including 'before_title', 'after_title',
     38         *                        'before_widget', and 'after_widget'.
     39         * @param array $instance The settings for the particular instance of the widget.
    3040         */
    3141        public function widget( $args, $instance ) {
    3242                static $first_dropdown = true;
     
    113123        }
    114124
    115125        /**
    116          * @param array $new_instance
    117          * @param array $old_instance
    118          * @return array
     126         * Updates a particular instance of a widget.
     127         *
     128         * This function should check that `$new_instance` is set correctly. The newly-calculated
     129         * value of `$instance` should be returned. If false is returned, the instance won't be
     130         * saved/updated.
     131         *
     132         * @since 2.8.0
     133         * @access public
     134         *
     135         * @param array $new_instance New settings for this instance as input by the user via
     136         *                            WP_Widget::form().
     137         * @param array $old_instance Old settings for this instance.
     138         * @return array Settings to save or bool false to cancel saving.
    119139         */
    120140        public function update( $new_instance, $old_instance ) {
    121141                $instance = $old_instance;
     
    129149        }
    130150
    131151        /**
    132          * @param array $instance
     152         * Outputs the settings update form.
     153         *
     154         * @since 2.8.0
     155         * @access public
     156         *
     157         * @param array $instance Current settings.
    133158         */
    134159        public function form( $instance ) {
    135160                //Defaults