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:
audrasjb 2024-01-28 08:19:17 +00:00
parent 7a908d39ac
commit 01f4eab4d5
3 changed files with 32 additions and 29 deletions

View File

@ -631,6 +631,9 @@ function _response_to_rss ($resp) {
* Set up constants with default values, unless user overrides.
*
* @since 1.5.0
*
* @global string $wp_version The WordPress version string.
*
* @package External
* @subpackage MagpieRSS
*/

View File

@ -16,7 +16,7 @@
*
* @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.

View File

@ -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.
*
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_sidebars The registered sidebars.
* @since 2.2.0
*/
$wp_registered_sidebars = array();
@ -36,7 +36,7 @@ $wp_registered_sidebars = array();
/**
* Stores the registered widgets.
*
* @global array $wp_registered_widgets
* @global array $wp_registered_widgets The registered widgets.
* @since 2.2.0
*/
$wp_registered_widgets = array();
@ -44,12 +44,12 @@ $wp_registered_widgets = array();
/**
* 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
*/
$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();
@ -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.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 {
* Optional. Array or string of arguments for the sidebar being registered.
@ -326,7 +326,7 @@ function register_sidebar( $args = array() ) {
*
* @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.
*/
@ -341,7 +341,7 @@ function unregister_sidebar( $sidebar_id ) {
*
* @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.
* @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_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
*
* @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
*
* @global array $wp_registered_widgets
* @global array $wp_registered_widgets The registered widgets.
*
* @param int|string $id Widget ID.
* @return string|void Widget description, if available.
@ -460,7 +460,7 @@ function wp_widget_description( $id ) {
*
* @since 2.9.0
*
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_sidebars The registered sidebars.
*
* @param string $id sidebar ID.
* @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
* by adding it to the function signature.
*
* @global array $wp_registered_widget_controls
* @global array $wp_registered_widget_updates
* @global array $wp_registered_widgets
* @global array $wp_registered_widget_controls The registered widget controls.
* @global array $wp_registered_widget_updates The registered widget updates.
* @global array $wp_registered_widgets The registered widgets.
* @global array $_wp_deprecated_widgets_callbacks
*
* @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
* 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 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
* 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 string $name Name attribute for the widget.
@ -680,8 +680,8 @@ function wp_unregister_widget_control( $id ) {
*
* @since 2.2.0
*
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_widgets Registered widgets.
* @global array $wp_registered_sidebars The registered sidebars.
* @global array $wp_registered_widgets The registered widgets.
*
* @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.
@ -891,7 +891,7 @@ function dynamic_sidebar( $index = 1 ) {
*
* @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 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
*
* @global array $wp_registered_widgets Registered widgets.
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_widgets The registered widgets.
* @global array $wp_registered_sidebars The registered sidebars.
*
* @return bool True if using widgets, false otherwise.
*/
@ -1100,7 +1100,7 @@ function wp_set_sidebars_widgets( $sidebars_widgets ) {
* @since 2.2.0
* @access private
*
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_sidebars The registered sidebars.
*
* @return array
*/
@ -1306,9 +1306,9 @@ function _wp_sidebars_changed() {
*
* @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 $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
* of 'customize' defers updates for the Customizer.
@ -1546,7 +1546,7 @@ function wp_map_sidebars_widgets( $existing_sidebars_widgets ) {
*
* @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 $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
*
* @global array $wp_registered_widgets
* @global array $wp_registered_sidebars
* @global array $wp_registered_widgets The registered widgets.
* @global array $wp_registered_sidebars The registered sidebars.
*
* @param string $widget_id Widget ID.
* @param string $sidebar_id Sidebar ID.
@ -2041,7 +2041,7 @@ function wp_render_widget( $widget_id, $sidebar_id ) {
*
* @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.
* @return string|null
@ -2125,7 +2125,7 @@ function wp_check_widget_editor_deps() {
* @since 6.2.0
* @access private
*
* @global array $wp_registered_sidebars Registered sidebars.
* @global array $wp_registered_sidebars The registered sidebars.
*/
function _wp_block_theme_register_classic_sidebars() {
global $wp_registered_sidebars;