Skip to content

Commit cbb385a

Browse files
committed
Check if typekit fonts exist in the kit
1 parent 5e7a2bd commit cbb385a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

classes/class-custom-typekit-fonts-render.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,8 @@ function bb_custom_fonts( $bb_fonts ) {
240240
*/
241241
function remove_typekit_font_google_url( $fonts ) {
242242

243-
$kit_list = get_option( 'custom-typekit-fonts' );
244-
245-
if ( $kit_list ) {
243+
$kit_list = get_option( 'custom-typekit-fonts', array() );
244+
if ( ! empty( $kit_list['custom-typekit-font-details'] ) ) {
246245
foreach ( $kit_list['custom-typekit-font-details'] as $key => $value ) {
247246
$font_key = "'" . $value['family'] . "'" . ',' . $value['fallback'];
248247
if ( array_key_exists( $font_key, $fonts ) ) {

0 commit comments

Comments
 (0)