Make WordPress Core

Ticket #34015: 34015.patch

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

Improve method documentation

  • src/wp-includes/widgets/class-wp-nav-menu-widget.php

     
    1616 */
    1717 class WP_Nav_Menu_Widget 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' => __('Add a custom menu to your sidebar.') );
    2127                parent::__construct( 'nav_menu', __('Custom Menu'), $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                // Get menu
     
    6577        }
    6678
    6779        /**
    68          * @param array $new_instance
    69          * @param array $old_instance
    70          * @return array
     80         * Updates a particular instance of a widget.
     81         *
     82         * This function should check that `$new_instance` is set correctly. The newly-calculated
     83         * value of `$instance` should be returned. If false is returned, the instance won't be
     84         * saved/updated.
     85         *
     86         * @since 2.8.0
     87         * @access public
     88         *
     89         * @param array $new_instance New settings for this instance as input by the user via
     90         *                            WP_Widget::form().
     91         * @param array $old_instance Old settings for this instance.
     92         * @return array Settings to save or bool false to cancel saving.
    7193         */
    7294        public function update( $new_instance, $old_instance ) {
    7395                $instance = array();
     
    81103        }
    82104
    83105        /**
    84          * @param array $instance
     106         * Outputs the settings update form.
     107         *
     108         * @since 2.8.0
     109         * @access public
     110         *
     111         * @param array $instance Current settings.
    85112         */
    86113        public function form( $instance ) {
    87114                $title = isset( $instance['title'] ) ? $instance['title'] : '';