From 7b56e53f61da625078a248097ae6cbb0b23118b3 Mon Sep 17 00:00:00 2001 From: prcdevgitbot Date: Thu, 14 Mar 2024 18:54:27 +0000 Subject: [PATCH] See https://github.com/pewresearch/pewresearch-org/commit/9722070a73438bbb8f6a567d32912f46b5f90a34 from refs/heads/release/5.0 --- blocks/post-taxonomy-terms/post-taxonomy-terms.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/blocks/post-taxonomy-terms/post-taxonomy-terms.php b/blocks/post-taxonomy-terms/post-taxonomy-terms.php index 0ca0e720d..9fa2c65d3 100644 --- a/blocks/post-taxonomy-terms/post-taxonomy-terms.php +++ b/blocks/post-taxonomy-terms/post-taxonomy-terms.php @@ -124,6 +124,7 @@ public function block_init() { // Create and register eligible taxonomy variations. foreach ( $taxonomies as $taxonomy ) { + $taxonomy_name = !empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; $variation = array( 'name' => $taxonomy->name, 'title' => $taxonomy->label, @@ -133,7 +134,7 @@ public function block_init() { $taxonomy->label ), 'attributes' => array( - 'taxonomy' => $taxonomy->rest_base, + 'taxonomy' => $taxonomy_name, ), 'isActive' => array( 'taxonomy' ), 'scope' => array( 'inserter', 'transform' ),