From 3c1a8e14079f1114a6672fca5b4292a1d8518c10 Mon Sep 17 00:00:00 2001 From: "Drew Jaynes (DrewAPicture)" Date: Sun, 7 Dec 2014 20:04:43 +0000 Subject: [PATCH] Introduce documentation for the `$id_base`, `$name`, `$widget_options`, `$control_options`, `$number`, `$id`, and `$updated` properties in `WP_Widget'. See #30315. git-svn-id: https://develop.svn.wordpress.org/trunk@30773 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/widgets.php | 71 +++++++++++++++++++++++++++++++++---- 1 file changed, 64 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php index e375bdc785..adee3ec8f4 100644 --- a/src/wp-includes/widgets.php +++ b/src/wp-includes/widgets.php @@ -23,14 +23,71 @@ */ class WP_Widget { - public $id_base; // Root id for all widgets of this type. - public $name; // Name for this widget type. - public $widget_options; // Option array passed to wp_register_sidebar_widget() - public $control_options; // Option array passed to wp_register_widget_control() + /** + * Root ID for all widgets of this type. + * + * @since 2.8.0 + * @access public + * @var mixed|string + */ + public $id_base; - public $number = false; // Unique ID number of the current instance. - public $id = false; // Unique ID string of the current instance (id_base-number) - public $updated = false; // Set true when we update the data after a POST submit - makes sure we don't do it twice. + /** + * Name for this widget type. + * + * @since 2.8.0 + * @access public + * @var string + */ + public $name; + + /** + * Option array passed to {@see wp_register_sidebar_widget()}. + * + * @since 2.8.0 + * @access public + * @var array + */ + public $widget_options; + + /** + * Option array passed to {@see wp_register_widget_control()}. + * + * @since 2.8.0 + * @access public + * @var array + */ + public $control_options; + + /** + * Unique ID number of the current instance. + * + * @since 2.8.0 + * @access public + * @var bool|int + */ + public $number = false; + + /** + * Unique ID string of the current instance (id_base-number). + * + * @since 2.8.0 + * @access public + * @var bool|string + */ + public $id = false; + + /** + * Whether the widget data has been updated. + * + * Set to true when the data is updated after a POST submit - ensures it does + * not happen twice. + * + * @since 2.8.0 + * @access public + * @var bool + */ + public $updated = false; // Member functions that you must over-ride.