Skip to content

Commit

Permalink
WC CPT Blocks: Remove term variations
Browse files Browse the repository at this point in the history
These are registered by core now, using the same name, so these variations never apply.
  • Loading branch information
ryelle committed Oct 18, 2024
1 parent 087161a commit d138352
Showing 1 changed file with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,3 @@ import './organizers-list';
import './sessions-list';
import './speakers-list';
import './sponsors-list';

/*
* Register the custom taxonomies as variations on Post Terms.
* See https://github.com/WordPress/gutenberg/blob/41325b983feabcc46615cd6b1a8a5efe64c5a9f0/packages/block-library/src/post-terms/variations.js.
*/
registerBlockVariation( 'core/post-terms', {
name: 'wcb_track',
title: __( 'Session Tracks', 'wordcamporg' ),
description: __( "Display a session's tracks.", 'wordcamporg' ),
category: 'wordcamp',
attributes: { term: 'wcb_track' },
isActive: ( blockAttributes ) => blockAttributes.term === 'wcb_track',
} );

registerBlockVariation( 'core/post-terms', {
name: 'wcb_session_category',
title: __( 'Session Categories', 'wordcamporg' ),
description: __( "Display a session's categories.", 'wordcamporg' ),
category: 'wordcamp',
attributes: { term: 'wcb_session_category' },
isActive: ( blockAttributes ) => blockAttributes.term === 'wcb_session_category',
} );

registerBlockVariation( 'core/post-terms', {
name: 'wcb_organizer_team',
title: __( 'Organizer Teams', 'wordcamporg' ),
description: __( "Display an organizer's teams.", 'wordcamporg' ),
category: 'wordcamp',
attributes: { term: 'wcb_organizer_team' },
isActive: ( blockAttributes ) => blockAttributes.term === 'wcb_organizer_team',
} );

0 comments on commit d138352

Please sign in to comment.