matlembo
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
I’m having the same problem! This is the filter I’m using:
/* --- Restrict Block Types by Post Type --- */ function mrl_allowed_block_types($allowed_post_types, $block_editor_context) { switch($block_editor_context->post->post_type) { case 'post': case 'page': case 'event': case 'project': case 'place': case 'person': // return true; return [ // text 'core/paragraph', 'core/heading', 'core/table', 'core/list', 'core/list-item', 'core/quote', 'core/code', 'core/preformatted', // media 'core/cover', 'core/image', 'core/audio', 'core/video', 'core/embed', // design 'core/buttons', 'core/button', 'core/separator', 'core/spacer', 'core/shortcode', 'core/group', 'core/columns', 'core/column', 'jetpack/layout-grid', 'jetpack/layout-grid-column', // custom 'acf/mrl-accordion', 'acf/mrl-animated-image', 'acf/mrl-curated-posts', 'acf/mrl-dynamic-posts', 'acf/mrl-dynamic-events', 'acf/mrl-events-index', 'acf/mrl-location-map', 'acf/mrl-personnel', 'acf/mrl-post-index', 'acf/mrl-scrolling-gallery', 'acf/mrl-treated-image', 'acf/mrl-event-sidebar', 'acf/mrl-event-buy-tickets-button', 'acf/mrl-event-ticket-price-details', 'acf/mrl-shuffle-board', // utilities 'core/post-title', // plugins 'gravityforms/form', ]; break; default: return true; // Allow all registered blocks for other post types } } add_filter( 'allowed_block_types_all', 'mrl_allowed_block_types', 10, 2 );
Forum: Plugins
In reply to: [Visual Editor Custom Buttons] Unclick wrap selection buttonI love this plugin. It’s a real time saver. But I’m having the same problem. I would expect a button that wraps a bit of text to behave like Bold, Italics, etc by indicating an “on” position when the wrapped text is selected and removing the wrap when clicked again. Currently, clicking again wraps the selection again.
Viewing 3 replies - 1 through 3 (of 3 total)