Skip to content

Commit

Permalink
PLANET-7345: Disable Posts List Query Loop WP variation (#2182)
Browse files Browse the repository at this point in the history
Ref: https://jira.greenpeace.org/browse/PLANET-7345

- Avoid naming confusions to editors since we have already
- A Posts List P4 variation with the same name

Co-authored-by: Dan Tovbein <dtovbein@gmail.com>
  • Loading branch information
GP-Dan-Tovbein and dantovbein authored Jan 2, 2024
1 parent 70d54b9 commit f6ac81a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions assets/src/blocks/editorIndex.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import {registerPostsListBlock} from './PostsList';
import {registerActionsList} from './ActionsList';

// Beta blocks
registerActionsList();
registerPostsListBlock();
wp.domReady(() => {
// Make sure to unregister the posts-list native variation before registering planet4-blocks/posts-list-block
wp.blocks.unregisterBlockVariation('core/query', 'posts-list');

// Beta blocks
registerActionsList();
registerPostsListBlock();
});

0 comments on commit f6ac81a

Please sign in to comment.