mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Docs: Improve docs for variadic functions relating to widgets and their controls.
See #37402 Built from https://develop.svn.wordpress.org/trunk@45449 git-svn-id: http://core.svn.wordpress.org/trunk@45260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87acdab81d
commit
557ef04409
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45448';
|
$wp_version = '5.3-alpha-45449';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
@ -337,6 +337,7 @@ function is_registered_sidebar( $sidebar_id ) {
|
|||||||
* @type string $description Widget description for display in the widget administration
|
* @type string $description Widget description for display in the widget administration
|
||||||
* panel and/or theme.
|
* panel and/or theme.
|
||||||
* }
|
* }
|
||||||
|
* @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
|
||||||
*/
|
*/
|
||||||
function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array() ) {
|
function wp_register_sidebar_widget( $id, $name, $output_callback, $options = array() ) {
|
||||||
global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks;
|
global $wp_registered_widgets, $wp_registered_widget_controls, $wp_registered_widget_updates, $_wp_deprecated_widgets_callbacks;
|
||||||
@ -464,10 +465,10 @@ function wp_unregister_sidebar_widget( $id ) {
|
|||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets
|
||||||
* @global array $_wp_deprecated_widgets_callbacks
|
* @global array $_wp_deprecated_widgets_callbacks
|
||||||
*
|
*
|
||||||
* @param int|string $id Sidebar ID.
|
* @param int|string $id Sidebar ID.
|
||||||
* @param string $name Sidebar display name.
|
* @param string $name Sidebar display name.
|
||||||
* @param callable $control_callback Run when sidebar is displayed.
|
* @param callable $control_callback Run when sidebar is displayed.
|
||||||
* @param array $options {
|
* @param array $options {
|
||||||
* Optional. Array or string of control options. Default empty array.
|
* Optional. Array or string of control options. Default empty array.
|
||||||
*
|
*
|
||||||
* @type int $height Never used. Default 200.
|
* @type int $height Never used. Default 200.
|
||||||
@ -476,6 +477,7 @@ function wp_unregister_sidebar_widget( $id ) {
|
|||||||
* @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the
|
* @type int|string $id_base Required for multi-widgets, i.e widgets that allow multiple instances such as the
|
||||||
* text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`.
|
* text widget. The widget id will end up looking like `{$id_base}-{$unique_number}`.
|
||||||
* }
|
* }
|
||||||
|
* @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
@ -539,6 +541,7 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
|
|||||||
* @param callable $update_callback Update callback method for the widget.
|
* @param callable $update_callback Update callback method for the widget.
|
||||||
* @param array $options Optional. Widget control options. See wp_register_widget_control().
|
* @param array $options Optional. Widget control options. See wp_register_widget_control().
|
||||||
* Default empty array.
|
* Default empty array.
|
||||||
|
* @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
@ -571,7 +574,9 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
|
|||||||
* @param callable $form_callback Form callback.
|
* @param callable $form_callback Form callback.
|
||||||
* @param array $options Optional. Widget control options. See wp_register_widget_control().
|
* @param array $options Optional. Widget control options. See wp_register_widget_control().
|
||||||
* Default empty array.
|
* Default empty array.
|
||||||
|
* @param mixed ...$params Optional additional parameters to pass to the callback function when it's called.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user