diff --git a/blocks/logo/src/edit.jsx b/blocks/logo/src/edit.jsx index ab3d0833c..30e4938eb 100644 --- a/blocks/logo/src/edit.jsx +++ b/blocks/logo/src/edit.jsx @@ -48,11 +48,11 @@ function LogoInner({ onLoad, className, width }) { const svgLoad = (svg) => { const svgEl = svg(); - const [w, h] = svgEl.props.viewBox.split(' ').slice(2); + const [width, height] = svgEl.props.viewBox.split(' ').slice(2); - console.log('svgEl', svgEl, svgEl.props.viewBox, w, h); + console.log('svgEl', svgEl, svgEl.props.viewBox, width, height); - onLoad(w, h); + onLoad(width, height); }; switch (selectedStyle[1]) { diff --git a/blocks/post-taxonomy-terms/post-taxonomy-terms.php b/blocks/post-taxonomy-terms/post-taxonomy-terms.php index 6695529ac..9fa2c65d3 100644 --- a/blocks/post-taxonomy-terms/post-taxonomy-terms.php +++ b/blocks/post-taxonomy-terms/post-taxonomy-terms.php @@ -55,16 +55,8 @@ public function render_block_callback( $attributes, $content, $block ) { )), 'style' => array_key_exists('separator', $attributes) ? '--separator: "' . $attributes['separator'] . '"' : null, )); - $post_id = get_the_ID(); - $parent_id = wp_get_post_parent_id($post_id); - $post_terms = wp_get_post_terms( $post_id, $taxonomy, array( 'number' => $per_page ) ); - // If this is a category taxonomy block we need to check if the only term being returned is "uncategorized" and if so, we need to return an empty array so that the block will look for the parent post's terms, if available. - if ( 'category' === $taxonomy && 1 === count($post_terms) && 'uncategorized' === $post_terms[0]->slug ) { - $post_terms = array(); - } - if ( 0 !== $parent_id && empty($post_terms) ) { - $post_terms = wp_get_post_terms( $parent_id, $taxonomy, array( 'number' => $per_page ) ); - } + + $post_terms = wp_get_post_terms( get_the_ID(), $taxonomy, array( 'number' => $per_page ) ); $markup = ''; if ( !empty($post_terms) && !is_wp_error($post_terms) ) { $markup .= '