Skip to content

Commit

Permalink
Fixed font saving unit test/bug
Browse files Browse the repository at this point in the history
  • Loading branch information
pbking committed Apr 16, 2024
1 parent 771b48d commit ebdcaab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion admin/create-theme/theme-fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ public static function get_user_activated_fonts() {
}

public static function copy_activated_fonts_to_theme() {
$font_families_to_copy = static::get_user_activated_fonts();
$user_settings = MY_Theme_JSON_Resolver::get_user_data()->get_settings();
if ( ! isset( $user_settings['typography']['fontFamilies']['custom'] ) ) {
return null;
}

$font_families_to_copy = $user_settings['typography']['fontFamilies']['custom'];

// If there are no custom fonts, bounce out
if ( is_null( $font_families_to_copy ) ) {
Expand Down

0 comments on commit ebdcaab

Please sign in to comment.