Plugin Updates
This commit is contained in:
@@ -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',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user