diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:57:26 +0000 |
commit | 30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch) | |
tree | 39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-includes/blocks/post-terms | |
parent | Adding upstream version 6.4.3+dfsg1. (diff) | |
download | wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip |
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | wp-includes/blocks/post-terms.php | 17 | ||||
-rw-r--r-- | wp-includes/blocks/post-terms/block.json | 3 |
2 files changed, 16 insertions, 4 deletions
diff --git a/wp-includes/blocks/post-terms.php b/wp-includes/blocks/post-terms.php index c97155b..c919db9 100644 --- a/wp-includes/blocks/post-terms.php +++ b/wp-includes/blocks/post-terms.php @@ -59,9 +59,11 @@ function render_block_core_post_terms( $attributes, $content, $block ) { } /** - * Registers the `core/post-terms` block on the server. + * Returns the available variations for the `core/post-terms` block. + * + * @return array The available variations for the block. */ -function register_block_core_post_terms() { +function block_core_post_terms_build_variations() { $taxonomies = get_taxonomies( array( 'publicly_queryable' => true, @@ -103,11 +105,18 @@ function register_block_core_post_terms() { } } + return array_merge( $built_ins, $custom_variations ); +} + +/** + * Registers the `core/post-terms` block on the server. + */ +function register_block_core_post_terms() { register_block_type_from_metadata( __DIR__ . '/post-terms', array( - 'render_callback' => 'render_block_core_post_terms', - 'variations' => array_merge( $built_ins, $custom_variations ), + 'render_callback' => 'render_block_core_post_terms', + 'variation_callback' => 'block_core_post_terms_build_variations', ) ); } diff --git a/wp-includes/blocks/post-terms/block.json b/wp-includes/blocks/post-terms/block.json index 0da7fb0..538768f 100644 --- a/wp-includes/blocks/post-terms/block.json +++ b/wp-includes/blocks/post-terms/block.json @@ -54,6 +54,9 @@ "__experimentalDefaultControls": { "fontSize": true } + }, + "interactivity": { + "clientNavigation": true } }, "style": "wp-block-post-terms" |