summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/widget-group
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/blocks/widget-group
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream.tar.xz
wordpress-upstream.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-includes/blocks/widget-group.php15
-rw-r--r--wp-includes/blocks/widget-group/block.json1
2 files changed, 16 insertions, 0 deletions
diff --git a/wp-includes/blocks/widget-group.php b/wp-includes/blocks/widget-group.php
index 8c8584b..e876961 100644
--- a/wp-includes/blocks/widget-group.php
+++ b/wp-includes/blocks/widget-group.php
@@ -8,6 +8,11 @@
/**
* Renders the 'core/widget-group' block.
*
+ * @since 5.9.0
+ *
+ * @global array $wp_registered_sidebars
+ * @global int|string $_sidebar_being_rendered
+ *
* @param array $attributes The block attributes.
* @param string $content The block content.
* @param WP_Block $block The block.
@@ -42,6 +47,8 @@ function render_block_core_widget_group( $attributes, $content, $block ) {
/**
* Registers the 'core/widget-group' block.
+ *
+ * @since 5.9.0
*/
function register_block_core_widget_group() {
register_block_type_from_metadata(
@@ -59,6 +66,10 @@ add_action( 'init', 'register_block_core_widget_group' );
* it. This lets us get to the current sidebar in
* render_block_core_widget_group().
*
+ * @since 5.9.0
+ *
+ * @global int|string $_sidebar_being_rendered
+ *
* @param int|string $index Index, name, or ID of the dynamic sidebar.
*/
function note_sidebar_being_rendered( $index ) {
@@ -70,6 +81,10 @@ add_action( 'dynamic_sidebar_before', 'note_sidebar_being_rendered' );
/**
* Clear whatever we set in note_sidebar_being_rendered() after WordPress
* finishes rendering a sidebar.
+ *
+ * @since 5.9.0
+ *
+ * @global int|string $_sidebar_being_rendered
*/
function discard_sidebar_being_rendered() {
global $_sidebar_being_rendered;
diff --git a/wp-includes/blocks/widget-group/block.json b/wp-includes/blocks/widget-group/block.json
index 0e59e58..6e7ba57 100644
--- a/wp-includes/blocks/widget-group/block.json
+++ b/wp-includes/blocks/widget-group/block.json
@@ -2,6 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/widget-group",
+ "title": "Widget Group",
"category": "widgets",
"attributes": {
"title": {