Remove style options you don't want editors to use, such as the Rounded image style or the Plain quote style.
add_action( 'enqueue_block_editor_assets', function (): void {
wp_add_inline_script(
'wp-blocks',
"wp.domReady( function () {
wp.blocks.unregisterBlockStyle( 'core/image', 'rounded' );
wp.blocks.unregisterBlockStyle( 'core/quote', 'plain' );
wp.blocks.unregisterBlockStyle( 'core/separator', 'dots' );
} );"
);
} );
Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.
Core blocks come with style variations, like a rounded image or a dots separator. If they don’t fit your design, editors shouldn’t be able to pick them. This snippet removes them from the editor.
Core block styles are registered in JavaScript, so they have to be removed in JavaScript too. The snippet adds a small script after the blocks package loads, and when the editor is ready, wp.blocks.unregisterBlockStyle() removes each one by block name and style name.
Add an Image block and open Styles. “Rounded” should be gone.