Make WordPress Core

Ticket #34019: 34019.patch

File 34019.patch, 2.1 KB (added by leemon, 9 years ago)

Improve method documentation

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

     
    1616 */
    1717class WP_Widget_Links 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('description' => __( "Your blogroll" ) );
    2127                parent::__construct('links', __('Links'), $widget_ops);
     
    2228        }
    2329
    2430        /**
    25          * @param array $args
    26          * @param array $instance
     31         * Echoes the widget content.
     32         *
     33         * @since 2.8.0
     34         * @access public
     35         *
     36         * @param array $args     Display arguments including 'before_title', 'after_title',
     37         *                        'before_widget', and 'after_widget'.
     38         * @param array $instance The settings for the particular instance of the widget.
    2739         */
    2840        public function widget( $args, $instance ) {
    2941                $show_description = isset($instance['description']) ? $instance['description'] : false;
     
    6880        }
    6981
    7082        /**
    71          * @param array $new_instance
    72          * @param array $old_instance
    73          * @return array
     83         * Updates a particular instance of a widget.
     84         *
     85         * This function should check that `$new_instance` is set correctly. The newly-calculated
     86         * value of `$instance` should be returned. If false is returned, the instance won't be
     87         * saved/updated.
     88         *
     89         * @since 2.8.0
     90         * @access public
     91         *
     92         * @param array $new_instance New settings for this instance as input by the user via
     93         *                            WP_Widget::form().
     94         * @param array $old_instance Old settings for this instance.
     95         * @return array Settings to save or bool false to cancel saving.
    7496         */
    7597        public function update( $new_instance, $old_instance ) {
    7698                $new_instance = (array) $new_instance;
     
    91113        }
    92114
    93115        /**
    94          * @param array $instance
     116         * Outputs the settings update form.
     117         *
     118         * @since 2.8.0
     119         * @access public
     120         *
     121         * @param array $instance Current settings.
    95122         */
    96123        public function form( $instance ) {
    97124