Skip to content

Commit

Permalink
Fluid Typography: Use wp_ prefixed function (#44876)
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham authored Oct 11, 2022
1 parent a3360a8 commit 4892315
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-link/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function block_core_navigation_link_build_css_font_sizes( $context ) {
// Add the custom font size inline style.
$font_sizes['inline_styles'] = sprintf(
'font-size: %s;',
gutenberg_get_typography_font_size_value(
wp_get_typography_font_size_value(
array(
'size' => $context['style']['typography']['fontSize'],
)
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/navigation-submenu/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function block_core_navigation_submenu_build_css_font_sizes( $context ) {
// Add the custom font size inline style.
$font_sizes['inline_styles'] = sprintf(
'font-size: %s;',
gutenberg_get_typography_font_size_value(
wp_get_typography_font_size_value(
array(
'size' => $context['style']['typography']['fontSize'],
)
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/page-list/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function block_core_page_list_build_css_font_sizes( $context ) {
// Add the custom font size inline style.
$font_sizes['inline_styles'] = sprintf(
'font-size: %s;',
gutenberg_get_typography_font_size_value(
wp_get_typography_font_size_value(
array(
'size' => $context['style']['typography']['fontSize'],
)
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/search/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function get_typography_styles_for_block_core_search( $attributes ) {
if ( ! empty( $attributes['style']['typography']['fontSize'] ) ) {
$typography_styles[] = sprintf(
'font-size: %s;',
gutenberg_get_typography_font_size_value(
wp_get_typography_font_size_value(
array(
'size' => $attributes['style']['typography']['fontSize'],
)
Expand Down
1 change: 1 addition & 0 deletions tools/webpack/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const blockViewRegex = new RegExp(
const prefixFunctions = [
'build_query_vars_from_query_block',
'wp_enqueue_block_support_styles',
'wp_get_typography_font_size_value',
'wp_style_engine_get_styles',
];

Expand Down

0 comments on commit 4892315

Please sign in to comment.