diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:30 +0000 |
commit | fa9a33d818470a5796f0ff8797f98b510ed8de18 (patch) | |
tree | bde6a1eede376f9b5df5898ce812330152984d8e /wp-includes/widgets.php | |
parent | Releasing progress-linux version 6.4.3+dfsg1-1~progress7.99u1. (diff) | |
download | wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.tar.xz wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.zip |
Merging upstream version 6.5+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-includes/widgets.php')
-rw-r--r-- | wp-includes/widgets.php | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index c568cbe..ff48419 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -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. @@ -1370,6 +1370,8 @@ function retrieve_widgets( $theme_changed = false ) { * @since 4.9.0 * @since 4.9.2 Always tries to restore widget assignments from previous data, not just if sidebars needed mapping. * + * @global array $wp_registered_sidebars The registered sidebars. + * * @param array $existing_sidebars_widgets List of sidebars and their widget instance IDs. * @return array Mapped sidebars widgets. */ @@ -1544,6 +1546,8 @@ function wp_map_sidebars_widgets( $existing_sidebars_widgets ) { * * @since 4.9.0 * + * @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. * @return array Sidebars with allowed widgets. @@ -1968,6 +1972,9 @@ function wp_assign_widget_to_sidebar( $widget_id, $sidebar_id ) { * * @since 5.8.0 * + * @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. * @return string @@ -2034,6 +2041,8 @@ function wp_render_widget( $widget_id, $sidebar_id ) { * * @since 5.8.0 * + * @global array $wp_registered_widget_controls The registered widget controls. + * * @param string $id Widget ID. * @return string|null */ @@ -2116,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; |