fix a warning in the case where the fonts aren't defined
This commit is contained in:
parent
b6f0bcb662
commit
273a5db258
1 changed files with 3 additions and 2 deletions
|
@ -50,9 +50,10 @@ function blank_canvas_blocks_fonts_url() {
|
|||
$fonts_url = '';
|
||||
|
||||
$theme_data = WP_Theme_JSON_Resolver::get_merged_data()->get_settings();
|
||||
$font_families = $theme_data['defaults']['custom']['fontsToLoadFromGoogle'];
|
||||
$custom_data = $theme_data['defaults']['custom'];
|
||||
if ( array_key_exists( 'fontsToLoadFromGoogle', $custom_data ) ) {
|
||||
$font_families = $theme_data['defaults']['custom']['fontsToLoadFromGoogle'];
|
||||
|
||||
if ( $font_families ) {
|
||||
$font_families[] = 'display=swap';
|
||||
|
||||
// Make a single request for the theme fonts.
|
||||
|
|
Loading…
Reference in a new issue