Disabling gradients is important - otherwise the background color would still be selectable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | <?php function mytheme_block_type_metadata_settings($settings, $metadata) { if ($settings['name'] == 'core/paragraph') { $settings['supports']['color']['background'] = false; $settings['supports']['color']['gradients'] = false; $settings['supports']['color']['text'] = false; } return $settings; } add_filter('block_type_metadata_settings', 'mytheme_block_type_metadata_settings', 10, 2); |