Skip to content

Commit

Permalink
remove varation
Browse files Browse the repository at this point in the history
  • Loading branch information
kt-12 committed Nov 29, 2023
1 parent 9225964 commit 7a95c4f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/wp-includes/blocks/template-part.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,12 @@ function build_template_part_block_variations() {
* Registers the `core/template-part` block on the server.
*/
function register_block_core_template_part() {
register_block_type_from_metadata(
__DIR__ . '/template-part',
array(
'render_callback' => 'render_block_core_template_part',
'variations' => build_template_part_block_variations(),
)
$args = array(
'render_callback' => 'render_block_core_template_part',
);
if ( current_user_can( 'edit_theme_options' ) ) {
$args['variations'] = build_template_part_block_variations();
}
register_block_type_from_metadata( __DIR__ . '/template-part', $args );
}
add_action( 'init', 'register_block_core_template_part' );

0 comments on commit 7a95c4f

Please sign in to comment.