How can I filter block registration based on post-type? (Block alignment settings)
I want to disable the .alignwide and .alignfull block alignment options (remove them from the editor UI) on the ‘post’ post-type only. I have tried using this block registration filter to modify the ‘supports’ attribute: function disablePostAlignwide( settings, name ) { if ( “post” != wp.data.select(‘core/editor’).getCurrentPostType() ) { return settings; } return lodash.assign( {}, settings, … Read more