From 9d5217151fe6903989f3d5484c07f985e4f01956 Mon Sep 17 00:00:00 2001 From: Luis Felipe Zaguini <26530524+zaguiini@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:49:29 -0300 Subject: [PATCH] Rename block variation category to 'blocks' instead of 'fields' (#107) --- includes/runtime/class-content-model-block.php | 2 +- includes/runtime/class-content-model.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/runtime/class-content-model-block.php b/includes/runtime/class-content-model-block.php index 6d5be13..7511bb4 100644 --- a/includes/runtime/class-content-model-block.php +++ b/includes/runtime/class-content-model-block.php @@ -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( diff --git a/includes/runtime/class-content-model.php b/includes/runtime/class-content-model.php index f0c08ec..6dcbe53 100644 --- a/includes/runtime/class-content-model.php +++ b/includes/runtime/class-content-model.php @@ -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;