Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/wp-includes/block-supports/typography.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function wp_typography_get_preset_inline_style_value( $style_value, $css_propert
* @return string Filtered block content.
*/
function wp_render_typography_support( $block_content, $block ) {
if ( ! empty( $block['attrs']['fitText'] ) && ! is_admin() ) {
if ( ! empty( $block['attrs']['fitText'] ) && $block['attrs']['fitText'] && ! is_admin() ) {
wp_enqueue_script_module( '@wordpress/block-editor/utils/fit-text-frontend' );

// Add Interactivity API directives for fit text to work with client-side navigation.
Expand All @@ -322,6 +322,8 @@ function wp_render_typography_support( $block_content, $block ) {
$block_content = $processor->get_updated_html();
}
}
// fitText supersedes any other typography features
return $block_content;
}
if ( ! isset( $block['attrs']['style']['typography']['fontSize'] ) ) {
return $block_content;
Expand Down
Loading