Make WordPress Core

Changeset 30773


Ignore:
Timestamp:
12/07/2014 08:04:43 PM (12 years ago)
Author:
DrewAPicture
Message:

Introduce documentation for the $id_base, $name, $widget_options, $control_options, $number, $id, and $updated properties in `WP_Widget'.

See #30315.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets.php

    r30770 r30773  
    2424class WP_Widget {
    2525
    26         public $id_base;                        // Root id for all widgets of this type.
    27         public $name;                           // Name for this widget type.
    28         public $widget_options; // Option array passed to wp_register_sidebar_widget()
    29         public $control_options;        // Option array passed to wp_register_widget_control()
    30 
    31         public $number = false; // Unique ID number of the current instance.
    32         public $id = false;             // Unique ID string of the current instance (id_base-number)
    33         public $updated = false;        // Set true when we update the data after a POST submit - makes sure we don't do it twice.
     26        /**
     27         * Root ID for all widgets of this type.
     28         *
     29         * @since 2.8.0
     30         * @access public
     31         * @var mixed|string
     32         */
     33        public $id_base;
     34
     35        /**
     36         * Name for this widget type.
     37         *
     38         * @since 2.8.0
     39         * @access public
     40         * @var string
     41         */
     42        public $name;
     43
     44        /**
     45         * Option array passed to {@see wp_register_sidebar_widget()}.
     46         *
     47         * @since 2.8.0
     48         * @access public
     49         * @var array
     50         */
     51        public $widget_options;
     52
     53        /**
     54         * Option array passed to {@see wp_register_widget_control()}.
     55         *
     56         * @since 2.8.0
     57         * @access public
     58         * @var array
     59         */
     60        public $control_options;
     61
     62        /**
     63         * Unique ID number of the current instance.
     64         *
     65         * @since 2.8.0
     66         * @access public
     67         * @var bool|int
     68         */
     69        public $number = false;
     70
     71        /**
     72         * Unique ID string of the current instance (id_base-number).
     73         *
     74         * @since 2.8.0
     75         * @access public
     76         * @var bool|string
     77         */
     78        public $id = false;
     79
     80        /**
     81         * Whether the widget data has been updated.
     82         *
     83         * Set to true when the data is updated after a POST submit - ensures it does
     84         * not happen twice.
     85         *
     86         * @since 2.8.0
     87         * @access public
     88         * @var bool
     89         */
     90        public $updated = false;
    3491
    3592        // Member functions that you must over-ride.
Note: See TracChangeset for help on using the changeset viewer.