Hi, I’m able to add styles to core blocks but when I try the exact same code for PG blocks I can’t get the styles to show up:
wp.blocks.registerBlockStyle('core/image', {
name: 'image-border-radius-lg',
label: 'Rounded Corner Large'
}
);
wp.blocks.registerBlockStyle('rental-world/gb-section', {
name: 'image-border-radius',
label: 'Rounded Corner'
}
);
function jr_enqueue_block_editor_assets() {
wp_enqueue_script( 'g_blocks', get_template_directory_uri() . '/a_js/g-blocks.js', array( 'wp-hooks', 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' ), null, true );
}
add_action( 'enqueue_block_editor_assets', 'jr_enqueue_block_editor_assets' );