In the block editor for posts and pages, I used to use the enqueue_block_editor_assets
hook to enqueue styles for the block.
add_action( 'enqueue_block_editor_assets','load_assets_in_block' );
function load_assets_in_block() {
wp_enqueue_style(
'block-style',
plugins_url( 'assets/css/block-style.css', PLAYER_PLUGIN ),
array(),
PLAYER_PLUGIN_VERSION,
false
);
}
This still works on posts and pages block, but it isn't working on the new site editor in WordPress 5.9? What is the recommended way to enqueue styles in site editor?
iframe
where the styles are not loaded. So they are not applied to the blocks and they are unstyled. I have a feeling this is an issue in Wordpress more than anything.