disable gutemberg welcome message
disable gutemberg welcome message
disable gutemberg welcome message
How to automatically remove noreferrer from targetd link rel attribute, on render?
Not supported yet, see the corresponding Github Issue. I found a workaround in order to at least register additional block styles: register_block_style( ‘create-block/myblock’, array( ‘name’ => ‘style2’, ‘label’ => ‘Style 2’, ‘style_handle’ => ‘create-block-myblock-style-2’, ) );
Ah … Got it. It’s not related to Gutenberg editor but WordPress core itself: window.wp.editor is being initiated here with those methods: https://github.com/WordPress/wordpress-develop/blob/9ed92faaca92f66ec9e2979c9d896ddab3e4e993/src/js/_enqueues/wp/editor/base.js And then, window.wp.oldEditor = window.wp.editor: https://github.com/WordPress/wordpress-develop/blob/5868743f1f2b05c93642c9eebf89cb7f6610d6df/src/wp-includes/script-loader.php#L369
Figured it out myself after all. Instead of using the pre_render_block filter, use the render_block filter to do something like this: add_filter(‘render_block’, function($html, $block) { if ($block[‘blockName’] !== ‘core/tag-cloud’) { return $html; } $doc = new \DOMDocument($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); $ps = iterator_to_array($doc->getElementsByTagName(‘p’)); $p = empty($ps) ? new \DOMElement(‘p’) : current($ps); return replaceChild($doc, $p, ‘div’, … Read more
How Add New Button to Gutenberg Editing Toolbar
Create a new custom block, lets call it CustomSecondary, that contains an InnerBlocks instance. When registering this block set it’s parent property to your main custom block and registerBlockType( ‘custom-secondary’, { parent: [‘your-main-block], edit: () => ( <InnerBlocks />) { .. your other properties } }); This will make it so this block can only … Read more
Suggested image dimensions Gutenberg Hook
wp_schedule_single_event issue with save_post hook in gutenberg
Pass PHP vars to gutenberg sidebar