Skip to content

Commit

Permalink
Adjust template part block isActive method (#45672)
Browse files Browse the repository at this point in the history
  • Loading branch information
edanzer authored Nov 9, 2022
1 parent 7fd1dc5 commit f8c3f1f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/block-library/src/template-part/variations.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export function enhanceTemplatePartVariations( settings, name ) {
'wp_template_part',
`${ theme }//${ slug }`
);

if ( entity?.slug ) {
return entity.slug === variationAttributes.slug;
}
return entity?.area === variationAttributes.area;
};

Expand Down

0 comments on commit f8c3f1f

Please sign in to comment.