Improve the @param docs for src/wp-includes/widgets.php.

See #30224.


git-svn-id: https://develop.svn.wordpress.org/trunk@30665 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-11-30 22:04:23 +00:00
parent 35358b0e26
commit 9e6096c89a

View File

@ -109,6 +109,11 @@ class WP_Widget {
/**
* PHP4 constructor
*
* @param string $id_base
* @param string $name
* @param array $widget_options
* @param array $control_options
*/
public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) {
WP_Widget::__construct( $id_base, $name, $widget_options, $control_options );
@ -272,7 +277,7 @@ class WP_Widget {
*
* Do NOT over-ride this function.
*
* @param mixed $deprecated Not used.
* @param int $deprecated Not used.
*/
public function update_callback( $deprecated = 1 ) {
global $wp_registered_widgets;
@ -847,7 +852,7 @@ function wp_widget_description( $id ) {
*
* @since 2.9.0
*
* @param int|string $id sidebar ID.
* @param string $id sidebar ID.
* @return string Sidebar description, if available. Null on failure to retrieve description.
*/
function wp_sidebar_description( $id ) {
@ -898,7 +903,6 @@ function wp_unregister_sidebar_widget($id) {
* @param string $name Sidebar display name.
* @param callback $control_callback Run when sidebar is displayed.
* @param array|string $options Optional. Widget options. See above long description.
* @param mixed $params,... Optional. Additional parameters to add to widget.
*/
function wp_register_widget_control($id, $name, $control_callback, $options = array()) {
global $wp_registered_widget_controls, $wp_registered_widget_updates, $wp_registered_widgets, $_wp_deprecated_widgets_callbacks;
@ -947,6 +951,13 @@ function wp_register_widget_control($id, $name, $control_callback, $options = ar
$wp_registered_widget_updates[$id_base] = $widget;
}
/**
*
* @global array $wp_registered_widget_updates
* @param string $id_base
* @param callable $update_callback
* @param array $options
*/
function _register_widget_update_callback($id_base, $update_callback, $options = array()) {
global $wp_registered_widget_updates;
@ -965,6 +976,15 @@ function _register_widget_update_callback($id_base, $update_callback, $options =
$wp_registered_widget_updates[$id_base] = $widget;
}
/**
*
* @global array $wp_registered_widget_controls
* @param int|string $id
* @param string $name
* @param callable $form_callback
* @param array $options
* @return null
*/
function _register_widget_form_callback($id, $name, $form_callback, $options = array()) {
global $wp_registered_widget_controls;
@ -1249,7 +1269,7 @@ function is_dynamic_sidebar() {
*
* @since 2.8.0
*
* @param mixed $index Sidebar name, id or number to check.
* @param string|int $index Sidebar name, id or number to check.
* @return bool true if the sidebar is in use, false otherwise.
*/
function is_active_sidebar( $index ) {
@ -1352,6 +1372,9 @@ function wp_get_widget_defaults() {
*
* @since 2.8.0
*
* @param string $base_name
* @param string $option_name
* @param array $settings
* @return array
*/
function wp_convert_widget_settings($base_name, $option_name, $settings) {
@ -1470,8 +1493,8 @@ function _wp_sidebars_changed() {
*
* @since 2.8.0
*
* @param mixed $theme_changed Whether the theme was changed as a boolean. A value
* of 'customize' defers updates for the Customizer.
* @param string|bool $theme_changed Whether the theme was changed as a boolean. A value
* of 'customize' defers updates for the Customizer.
* @return array
*/
function retrieve_widgets( $theme_changed = false ) {