Make WordPress Core

Ticket #34023: 34023.patch

File 34023.patch, 2.2 KB (added by leemon, 9 years ago)

Improve method documentation

  • src/wp-includes/widgets/class-wp-widget-recent-posts.php

     
    1616 */
    1717class WP_Widget_Recent_Posts extends WP_Widget {
    1818
     19        /**
     20         * PHP5 constructor.
     21         *
     22         * @since 2.8.0
     23         * @access public
     24         */
    1925        public function __construct() {
    2026                $widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "Your site’s most recent Posts.") );
    2127                parent::__construct('recent-posts', __('Recent Posts'), $widget_ops);
     
    2329        }
    2430
    2531        /**
    26          * @param array $args
    27          * @param array $instance
     32         * Echoes the widget content.
     33         *
     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.
    2840         */
    2941        public function widget( $args, $instance ) {
    3042                if ( ! isset( $args['widget_id'] ) ) {
     
    8294        }
    8395
    8496        /**
    85          * @param array $new_instance
    86          * @param array $old_instance
    87          * @return array
     97         * Updates a particular instance of a widget.
     98         *
     99         * This function should check that `$new_instance` is set correctly. The newly-calculated
     100         * value of `$instance` should be returned. If false is returned, the instance won't be
     101         * saved/updated.
     102         *
     103         * @since 2.8.0
     104         * @access public
     105         *
     106         * @param array $new_instance New settings for this instance as input by the user via
     107         *                            WP_Widget::form().
     108         * @param array $old_instance Old settings for this instance.
     109         * @return array Settings to save or bool false to cancel saving.
    88110         */
    89111        public function update( $new_instance, $old_instance ) {
    90112                $instance = $old_instance;
     
    95117        }
    96118
    97119        /**
    98          * @param array $instance
     120         * Outputs the settings update form.
     121         *
     122         * @since 2.8.0
     123         * @access public
     124         *
     125         * @param array $instance Current settings.
    99126         */
    100127        public function form( $instance ) {
    101128                $title     = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';