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

See #30224.

Built from https://develop.svn.wordpress.org/trunk@30665


git-svn-id: http://core.svn.wordpress.org/trunk@30655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2014-11-30 22:05:21 +00:00
parent b63c789e88
commit 5d75282328
2 changed files with 30 additions and 7 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.1-beta2-30664'; $wp_version = '4.1-beta2-30665';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

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