Make WordPress Core

Changeset 34621


Ignore:
Timestamp:
09/27/2015 01:15:13 AM (9 years ago)
Author:
DrewAPicture
Message:

Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Nav_Menu_Widget.

Props leemon.
Fixes #34015. Fixes #34013.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-nav-menu-widget.php

    r34566 r34621  
    99
    1010/**
    11  * Core class used to implement the Navigation Menu widget.
     11 * Core class used to implement the Custom Menu widget.
    1212 *
    1313 * @since 3.0.0
     
    1717 class WP_Nav_Menu_Widget extends WP_Widget {
    1818
     19    /**
     20     * Sets up a new Custom Menu widget instance.
     21     *
     22     * @since 3.0.0
     23     * @access public
     24     */
    1925    public function __construct() {
    2026        $widget_ops = array( 'description' => __('Add a custom menu to your sidebar.') );
     
    2329
    2430    /**
    25      * @param array $args
    26      * @param array $instance
     31     * Outputs the content for the current Custom Menu widget instance.
     32     *
     33     * @since 3.0.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 Settings for the current Custom Menu widget instance.
    2739     */
    2840    public function widget( $args, $instance ) {
     
    6678
    6779    /**
    68      * @param array $new_instance
    69      * @param array $old_instance
    70      * @return array
     80     * Handles updating settings for the current Custom Menu widget instance.
     81     *
     82     * @since 3.0.0
     83     * @access public
     84     *
     85     * @param array $new_instance New settings for this instance as input by the user via
     86     *                            WP_Widget::form().
     87     * @param array $old_instance Old settings for this instance.
     88     * @return array Updated settings to save.
    7189     */
    7290    public function update( $new_instance, $old_instance ) {
     
    82100
    83101    /**
    84      * @param array $instance
     102     * Outputs the settings form for the Custom Menu widget.
     103     *
     104     * @since 3.0.0
     105     * @access public
     106     *
     107     * @param array $instance Current settings.
    85108     */
    86109    public function form( $instance ) {
Note: See TracChangeset for help on using the changeset viewer.