$fam ) { $font_names[] = $fam['name']; } // Get all non-Google font names $not_google = generate_typography_default_fonts(); // Merge them both into one array $valid = array_merge( $font_names, $not_google ); // Sanitize if ( in_array( $input, $valid ) ) { return $input; } else { return 'Open Sans'; } } } if ( ! function_exists( 'generate_sanitize_font_weight' ) ) { /** * Sanitize font weight. * * @since 1.1.10 * @deprecated 1.3.40 */ function generate_sanitize_font_weight( $input ) { $valid = array( 'normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900', ); if ( in_array( $input, $valid ) ) { return $input; } else { return 'normal'; } } } if ( ! function_exists( 'generate_sanitize_text_transform' ) ) { /** * Sanitize text transform. * * @since 1.1.10 * @deprecated 1.3.40 */ function generate_sanitize_text_transform( $input ) { $valid = array( 'none', 'capitalize', 'uppercase', 'lowercase', ); if ( in_array( $input, $valid ) ) { return $input; } else { return 'none'; } } } if ( ! function_exists( 'generate_typography_customize_preview_css' ) ) { /** * Hide the hidden input control * @since 1.3.40 */ function generate_typography_customize_preview_css() { ?>