-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Block] Stretchy Text
Description
What problem does this address?
Hi,
I appreciate the continued development of Gutenberg and WordPress and offering new features in the editor, I'd like to disable the FitText option for our content editors at this time.
What is your proposed solution?
A canonical method to disable editors from using the fitText option in blocks.
Using the block_type_metadata filter in PHP, I can disable support but that does not remove the variations from appearing in the block's transforms windows.
function remove_fitText_variation( $metadata ) {
$teh_array = ['core/paragraph', 'core/heading'];
if ( in_array($metadata['name'], $teh_array, true )) {
$metadata['supports']['typography']['fitText'] = false;
}
return $metadata;
}
add_filter( 'block_type_metadata', 'remove_fitText_variation' );
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs Technical FeedbackNeeds testing from a developer perspective.Needs testing from a developer perspective.[Block] Stretchy Text
Type
Fields
Give feedbackNo fields configured for issues without a type.