Skip to content

Commit

Permalink
Rename block variation category to 'blocks' instead of 'fields' (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini authored Sep 3, 2024
1 parent 15889ca commit 9d52171
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion includes/runtime/class-content-model-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function register_block_variation( $variations, $block_type ) {
$variation = array(
'name' => sanitize_title( $this->block_variation_name ),
'title' => $this->block_variation_name,
'category' => $this->content_model->slug . '-fields',
'category' => $this->content_model->slug . '-blocks',
'attributes' => array_merge(
$this->raw_block['attrs'],
array(
Expand Down
4 changes: 2 additions & 2 deletions includes/runtime/class-content-model.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ public function cast_meta_field_types( $value, $object_id, $meta_key ) {
*/
public function register_block_category( $categories ) {
$categories[] = array(
'slug' => $this->slug . '-fields',
'slug' => $this->slug . '-blocks',
// translators: %s is content model name.
'title' => sprintf( __( '%s fields' ), ucwords( $this->title ) ),
'title' => sprintf( __( '%s blocks' ), ucwords( $this->title ) ),
);

return $categories;
Expand Down

0 comments on commit 9d52171

Please sign in to comment.