From 25a65d856b48b36eb7526e36eac395fba0bd96fb Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sun, 7 Dec 2014 20:05:22 +0000 Subject: [PATCH] Introduce documentation for the `$id_base`, `$name`, `$widget_options`, `$control_options`, `$number`, `$id`, and `$updated` properties in `WP_Widget'. See #30315. Built from https://develop.svn.wordpress.org/trunk@30773 git-svn-id: http://core.svn.wordpress.org/trunk@30763 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/widgets.php | 71 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 65 insertions(+), 8 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 497b14a3f4..060b1bf798 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-beta2-30772'; +$wp_version = '4.1-beta2-30773'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index e375bdc785..adee3ec8f4 100644 --- a/wp-includes/widgets.php +++ b/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.