Docs: Add missing information to the `WP_Widget` PHP4 constructor DocBlock.
Also add several missing at `@access` tags to other method DocBlocks and clarify parameter docs for `WP_Widget::form_callback()`. Props raimy. See #36298. Built from https://develop.svn.wordpress.org/trunk@37064 git-svn-id: http://core.svn.wordpress.org/trunk@37031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e6d9d95f6d
commit
893871a5d1
|
@ -162,10 +162,18 @@ class WP_Widget {
|
|||
/**
|
||||
* PHP4 constructor.
|
||||
*
|
||||
* @param string $id_base
|
||||
* @param string $name
|
||||
* @param array $widget_options
|
||||
* @param array $control_options
|
||||
* @since 2.8.0
|
||||
* @access public
|
||||
*
|
||||
* @see __construct()
|
||||
*
|
||||
* @param string $id_base Optional Base ID for the widget, lowercase and unique. If left empty,
|
||||
* a portion of the widget's class name will be used Has to be unique.
|
||||
* @param string $name Name for the widget displayed on the configuration page.
|
||||
* @param array $widget_options Optional. Widget options. See wp_register_sidebar_widget() for information
|
||||
* on accepted arguments. Default empty array.
|
||||
* @param array $control_options Optional. Widget control options. See wp_register_widget_control() for
|
||||
* information on accepted arguments. Default empty array.
|
||||
*/
|
||||
public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
|
||||
_deprecated_constructor( 'WP_Widget', '4.3.0', get_class( $this ) );
|
||||
|
@ -179,6 +187,7 @@ class WP_Widget {
|
|||
*
|
||||
* @since 2.8.0
|
||||
* @since 4.4.0 Array format field names are now accepted.
|
||||
* @access public
|
||||
*
|
||||
* @param string $field_name Field name
|
||||
* @return string Name attribute for $field_name
|
||||
|
@ -212,7 +221,7 @@ class WP_Widget {
|
|||
* Register all widget instances of this widget class.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @access public
|
||||
*/
|
||||
public function _register() {
|
||||
$settings = $this->get_settings();
|
||||
|
@ -244,7 +253,7 @@ class WP_Widget {
|
|||
* Set the internal order number for the widget instance.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @access public
|
||||
*
|
||||
* @param int $number The unique order number of this widget instance compared to other
|
||||
* instances of the same class.
|
||||
|
@ -258,6 +267,7 @@ class WP_Widget {
|
|||
* Retrieves the widget display callback.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access public
|
||||
*
|
||||
* @return callable Display callback.
|
||||
*/
|
||||
|
@ -269,6 +279,7 @@ class WP_Widget {
|
|||
* Retrieves the widget update callback.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access public
|
||||
*
|
||||
* @return callable Update callback.
|
||||
*/
|
||||
|
@ -280,6 +291,7 @@ class WP_Widget {
|
|||
* Retrieves the form callback.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access public
|
||||
*
|
||||
* @return callable Form callback.
|
||||
*/
|
||||
|
@ -457,7 +469,12 @@ class WP_Widget {
|
|||
* @since 2.8.0
|
||||
* @access public
|
||||
*
|
||||
* @param int|array $widget_args Widget instance number or array of widget arguments.
|
||||
* @param int|array $widget_args {
|
||||
* Optional. Internal order number of the widget instance, or array of multi-widget arguments.
|
||||
* Default 1.
|
||||
*
|
||||
* @type int $number Number increment used for multiples of the same widget.
|
||||
* }
|
||||
* @return string|null
|
||||
*/
|
||||
public function form_callback( $widget_args = 1 ) {
|
||||
|
@ -517,7 +534,7 @@ class WP_Widget {
|
|||
* Register an instance of the widget class.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @access private
|
||||
* @access public
|
||||
*
|
||||
* @param integer $number Optional. The unique order number of this widget instance
|
||||
* compared to other instances of the same class. Default -1.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-beta4-37063';
|
||||
$wp_version = '4.5-beta4-37064';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue