Clean up bundled pattern titles & categories#30998
Conversation
There was a problem hiding this comment.
I was registering these inside the init filter because if I didn't I was getting an error while the admin was loading, but I don't see that any more
There was a problem hiding this comment.
I'm not sure registering these categories is needed, except for query that doesn't exists in core. Also not introduced in this PR, but the registration of the other categories might not be needed.. Will look now..
|
Size Change: +19 B (0%) Total Size: 1.46 MB
ℹ️ View Unchanged
|
5e78de3 to
a50313d
Compare
MaggieCabrera
left a comment
There was a problem hiding this comment.
This LGTM, I just rebased since I think that's all it's needed for the tests to go green.
| } | ||
|
|
||
| register_block_pattern_category( 'buttons', array( 'label' => _x( 'Buttons', 'Block pattern category', 'default' ) ) ); | ||
| register_block_pattern_category( 'columns', array( 'label' => _x( 'Columns', 'Block pattern category', 'default' ) ) ); |
There was a problem hiding this comment.
It seems that the registration of categories happens in core:
https://github.com/WordPress/wordpress-develop/blob/master/src/wp-includes/block-patterns.php#L42
and we do not unregister the categories, only the core patterns.
I think it's okay to remove these registrations and the above, except query that is not in core.
Was any specific reason for these lines @MaggieCabrera ?
There was a problem hiding this comment.
yeah, initially they were named differently and then they ended having the same names as the ones on core, so I'd say we can remove the duplicates, yes
There was a problem hiding this comment.
Cool, I've removed them in 3c3cea8 and it seems to work fine. Mind giving the PR one last look?
Some minor followup from #30763, #29973, and #30469.
This PR: