Docs: Improve various globals documentation, as per docblock standards.
Props upadalavipul, audrasjb, shailu25, viralsampat. Fixes #59255. See #59651. Built from https://develop.svn.wordpress.org/trunk@57370 git-svn-id: http://core.svn.wordpress.org/trunk@56876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7a908d39ac
commit
01f4eab4d5
|
@ -631,6 +631,9 @@ function _response_to_rss ($resp) {
|
||||||
* Set up constants with default values, unless user overrides.
|
* Set up constants with default values, unless user overrides.
|
||||||
*
|
*
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
|
*
|
||||||
|
* @global string $wp_version The WordPress version string.
|
||||||
|
*
|
||||||
* @package External
|
* @package External
|
||||||
* @subpackage MagpieRSS
|
* @subpackage MagpieRSS
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.5-alpha-57369';
|
$wp_version = '6.5-alpha-57370';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
|
|
|
@ -28,7 +28,7 @@ global $wp_registered_sidebars, $wp_registered_widgets, $wp_registered_widget_co
|
||||||
/**
|
/**
|
||||||
* Stores the sidebars, since many themes can have more than one.
|
* Stores the sidebars, since many themes can have more than one.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*/
|
*/
|
||||||
$wp_registered_sidebars = array();
|
$wp_registered_sidebars = array();
|
||||||
|
@ -36,7 +36,7 @@ $wp_registered_sidebars = array();
|
||||||
/**
|
/**
|
||||||
* Stores the registered widgets.
|
* Stores the registered widgets.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*/
|
*/
|
||||||
$wp_registered_widgets = array();
|
$wp_registered_widgets = array();
|
||||||
|
@ -44,12 +44,12 @@ $wp_registered_widgets = array();
|
||||||
/**
|
/**
|
||||||
* Stores the registered widget controls (options).
|
* Stores the registered widget controls (options).
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widget_controls
|
* @global array $wp_registered_widget_controls The registered widget controls.
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*/
|
*/
|
||||||
$wp_registered_widget_controls = array();
|
$wp_registered_widget_controls = array();
|
||||||
/**
|
/**
|
||||||
* @global array $wp_registered_widget_updates
|
* @global array $wp_registered_widget_updates The registered widget updates.
|
||||||
*/
|
*/
|
||||||
$wp_registered_widget_updates = array();
|
$wp_registered_widget_updates = array();
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ function register_sidebars( $number = 1, $args = array() ) {
|
||||||
* @since 5.6.0 Added the `before_sidebar` and `after_sidebar` arguments.
|
* @since 5.6.0 Added the `before_sidebar` and `after_sidebar` arguments.
|
||||||
* @since 5.9.0 Added the `show_in_rest` argument.
|
* @since 5.9.0 Added the `show_in_rest` argument.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @param array|string $args {
|
* @param array|string $args {
|
||||||
* Optional. Array or string of arguments for the sidebar being registered.
|
* Optional. Array or string of arguments for the sidebar being registered.
|
||||||
|
@ -326,7 +326,7 @@ function register_sidebar( $args = array() ) {
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @param string|int $sidebar_id The ID of the sidebar when it was registered.
|
* @param string|int $sidebar_id The ID of the sidebar when it was registered.
|
||||||
*/
|
*/
|
||||||
|
@ -341,7 +341,7 @@ function unregister_sidebar( $sidebar_id ) {
|
||||||
*
|
*
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @param string|int $sidebar_id The ID of the sidebar when it was registered.
|
* @param string|int $sidebar_id The ID of the sidebar when it was registered.
|
||||||
* @return bool True if the sidebar is registered, false otherwise.
|
* @return bool True if the sidebar is registered, false otherwise.
|
||||||
|
@ -367,7 +367,7 @@ function is_registered_sidebar( $sidebar_id ) {
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets Uses stored registered widgets.
|
* @global array $wp_registered_widgets Uses stored registered widgets.
|
||||||
* @global array $wp_registered_widget_controls Stores the registered widget controls (options).
|
* @global array $wp_registered_widget_controls Stores the registered widget controls (options).
|
||||||
* @global array $wp_registered_widget_updates
|
* @global array $wp_registered_widget_updates The registered widget updates.
|
||||||
* @global array $_wp_deprecated_widgets_callbacks
|
* @global array $_wp_deprecated_widgets_callbacks
|
||||||
*
|
*
|
||||||
* @param int|string $id Widget ID.
|
* @param int|string $id Widget ID.
|
||||||
|
@ -435,7 +435,7 @@ function wp_register_sidebar_widget( $id, $name, $output_callback, $options = ar
|
||||||
*
|
*
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
*
|
*
|
||||||
* @param int|string $id Widget ID.
|
* @param int|string $id Widget ID.
|
||||||
* @return string|void Widget description, if available.
|
* @return string|void Widget description, if available.
|
||||||
|
@ -460,7 +460,7 @@ function wp_widget_description( $id ) {
|
||||||
*
|
*
|
||||||
* @since 2.9.0
|
* @since 2.9.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @param string $id sidebar ID.
|
* @param string $id sidebar ID.
|
||||||
* @return string|void Sidebar description, if available.
|
* @return string|void Sidebar description, if available.
|
||||||
|
@ -506,9 +506,9 @@ function wp_unregister_sidebar_widget( $id ) {
|
||||||
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
||||||
* by adding it to the function signature.
|
* by adding it to the function signature.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widget_controls
|
* @global array $wp_registered_widget_controls The registered widget controls.
|
||||||
* @global array $wp_registered_widget_updates
|
* @global array $wp_registered_widget_updates The registered widget updates.
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The 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.
|
||||||
|
@ -583,7 +583,7 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
|
||||||
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
||||||
* by adding it to the function signature.
|
* by adding it to the function signature.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widget_updates
|
* @global array $wp_registered_widget_updates The registered widget updates.
|
||||||
*
|
*
|
||||||
* @param string $id_base The base ID of a widget created by extending WP_Widget.
|
* @param string $id_base The base ID of a widget created by extending WP_Widget.
|
||||||
* @param callable $update_callback Update callback method for the widget.
|
* @param callable $update_callback Update callback method for the widget.
|
||||||
|
@ -617,7 +617,7 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
|
||||||
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
* @since 5.3.0 Formalized the existing and already documented `...$params` parameter
|
||||||
* by adding it to the function signature.
|
* by adding it to the function signature.
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widget_controls
|
* @global array $wp_registered_widget_controls The registered widget controls.
|
||||||
*
|
*
|
||||||
* @param int|string $id Widget ID.
|
* @param int|string $id Widget ID.
|
||||||
* @param string $name Name attribute for the widget.
|
* @param string $name Name attribute for the widget.
|
||||||
|
@ -680,8 +680,8 @@ function wp_unregister_widget_control( $id ) {
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
* @global array $wp_registered_widgets Registered widgets.
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
*
|
*
|
||||||
* @param int|string $index Optional. Index, name or ID of dynamic sidebar. Default 1.
|
* @param int|string $index Optional. Index, name or ID of dynamic sidebar. Default 1.
|
||||||
* @return bool True, if widget sidebar was found and called. False if not found or not called.
|
* @return bool True, if widget sidebar was found and called. False if not found or not called.
|
||||||
|
@ -891,7 +891,7 @@ function dynamic_sidebar( $index = 1 ) {
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
*
|
*
|
||||||
* @param callable|false $callback Optional. Widget callback to check. Default false.
|
* @param callable|false $callback Optional. Widget callback to check. Default false.
|
||||||
* @param string|false $widget_id Optional. Widget ID. Optional, but needed for checking.
|
* @param string|false $widget_id Optional. Widget ID. Optional, but needed for checking.
|
||||||
|
@ -937,8 +937,8 @@ function is_active_widget( $callback = false, $widget_id = false, $id_base = fal
|
||||||
*
|
*
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets Registered widgets.
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @return bool True if using widgets, false otherwise.
|
* @return bool True if using widgets, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
@ -1100,7 +1100,7 @@ function wp_set_sidebars_widgets( $sidebars_widgets ) {
|
||||||
* @since 2.2.0
|
* @since 2.2.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -1306,9 +1306,9 @@ function _wp_sidebars_changed() {
|
||||||
*
|
*
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
* @global array $sidebars_widgets
|
* @global array $sidebars_widgets
|
||||||
* @global array $wp_registered_widgets Registered widgets.
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
*
|
*
|
||||||
* @param string|bool $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.
|
||||||
|
@ -1546,7 +1546,7 @@ function wp_map_sidebars_widgets( $existing_sidebars_widgets ) {
|
||||||
*
|
*
|
||||||
* @since 4.9.0
|
* @since 4.9.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
*
|
*
|
||||||
* @param array $sidebars_widgets List of sidebars and their widget instance IDs.
|
* @param array $sidebars_widgets List of sidebars and their widget instance IDs.
|
||||||
* @param array $allowed_widget_ids Optional. List of widget IDs to compare against. Default: Registered widgets.
|
* @param array $allowed_widget_ids Optional. List of widget IDs to compare against. Default: Registered widgets.
|
||||||
|
@ -1972,8 +1972,8 @@ function wp_assign_widget_to_sidebar( $widget_id, $sidebar_id ) {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widgets
|
* @global array $wp_registered_widgets The registered widgets.
|
||||||
* @global array $wp_registered_sidebars
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*
|
*
|
||||||
* @param string $widget_id Widget ID.
|
* @param string $widget_id Widget ID.
|
||||||
* @param string $sidebar_id Sidebar ID.
|
* @param string $sidebar_id Sidebar ID.
|
||||||
|
@ -2041,7 +2041,7 @@ function wp_render_widget( $widget_id, $sidebar_id ) {
|
||||||
*
|
*
|
||||||
* @since 5.8.0
|
* @since 5.8.0
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_widget_controls
|
* @global array $wp_registered_widget_controls The registered widget controls.
|
||||||
*
|
*
|
||||||
* @param string $id Widget ID.
|
* @param string $id Widget ID.
|
||||||
* @return string|null
|
* @return string|null
|
||||||
|
@ -2125,7 +2125,7 @@ function wp_check_widget_editor_deps() {
|
||||||
* @since 6.2.0
|
* @since 6.2.0
|
||||||
* @access private
|
* @access private
|
||||||
*
|
*
|
||||||
* @global array $wp_registered_sidebars Registered sidebars.
|
* @global array $wp_registered_sidebars The registered sidebars.
|
||||||
*/
|
*/
|
||||||
function _wp_block_theme_register_classic_sidebars() {
|
function _wp_block_theme_register_classic_sidebars() {
|
||||||
global $wp_registered_sidebars;
|
global $wp_registered_sidebars;
|
||||||
|
|
Loading…
Reference in New Issue