Skip to content

Commit ebdcaab

Browse files
committed
Fixed font saving unit test/bug
1 parent 771b48d commit ebdcaab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

admin/create-theme/theme-fonts.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ public static function get_user_activated_fonts() {
2222
}
2323

2424
public static function copy_activated_fonts_to_theme() {
25-
$font_families_to_copy = static::get_user_activated_fonts();
25+
$user_settings = MY_Theme_JSON_Resolver::get_user_data()->get_settings();
26+
if ( ! isset( $user_settings['typography']['fontFamilies']['custom'] ) ) {
27+
return null;
28+
}
29+
30+
$font_families_to_copy = $user_settings['typography']['fontFamilies']['custom'];
2631

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

0 commit comments

Comments
 (0)