Register multiple styles / scripts in register_block_type

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’, ) );

How `window.wp.oldEditor` is being set in the editor?

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

Filter root element of tag cloud block

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)