Skip to content

Commit ded5ff5

Browse files
committed
refactor missing array cast
1 parent 7f354ce commit ded5ff5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

includes/create-theme/theme-fonts.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,7 @@ public static function copy_activated_fonts_to_theme() {
107107
foreach ( $font_family['fontFace'] as &$font_face ) {
108108
// src can be a string or an array
109109
// if it is a string, cast it to an array
110-
if ( ! is_array( $font_face['src'] ) ) {
111-
$font_face['src'] = array( $font_face['src'] );
112-
}
110+
$font_face['src'] = (array) $font_face['src'];
113111
foreach ( $font_face['src'] as $font_src_index => &$font_src ) {
114112
$font_filename = basename( $font_src );
115113
$font_dir = wp_get_font_dir();

0 commit comments

Comments
 (0)