public_html/wp-content/themes/LocalTwo/core/customizer/includes/class-kirki-fonts.php
/**
	 * Given a font, chose the variants to load for the theme.
	 *
	 * Attempts to load regular, italic, and 700. If regular is not found, the first variant in the family is chosen. italic
	 * and 700 are only loaded if found. No fallbacks are loaded for those fonts.
	 *
	 * @param  string    $font        The font to load variants for.
	 * @param  array     $variants    The variants for the font.
	 * @return array                  The chosen variants.
	 */
Given a font, chose the variants to load for the theme.
Attempts to load regular, italic, and 700. If regular is not found, the first variant in the family is chosen. italic
and 700 are only loaded if found. No fallbacks are loaded for those fonts.

@param  string    $font        The font to load variants for.
@param  array     $variants    The variants for the font.
@return array                  The chosen variants.
Given a font chose the variants to load for the theme . Attempts to load regular italic and 700 . If regular is not found the first variant in the family is chosen . italic and 700 are only loaded if found . No fallbacks are loaded for those fonts . @param string $font The font to load variants for . @param array $variants The variants for the font . @return array The chosen variants .
public static function choose_google_font_variants( $font, $variants = array() ) {
		$chosen_variants = array();
		if ( empty( $variants ) ) {
			$fonts = self::get_google_fonts();
			if ( array_key_exists( $font, $fonts ) ) {
				$variants = $fonts[ $font ]['variants'];
			}
		}
		if ( ! in_array( 'regular', $variants ) ) {
			$chosen_variants[] = $variants[0];
		} else {
			$chosen_variants[] = 'regular';
		}
		if ( in_array( 'italic', $variants ) ) {
			$chosen_variants[] = 'italic';
		}
		if ( in_array( '300', $variants ) ) {
			$chosen_variants[] = '300';
		}
		if ( in_array( '700', $variants ) ) {
			$chosen_variants[] = '700';
		}
		return apply_filters( 'kirki/font/variants', array_unique( $chosen_variants ), $font, $variants );
	}
public static function choose_google_font_variants ( $ font , $ variants = array ( ) ) { $ chosen_variants = array ( ) ; if ( empty ( $ variants ) ) { $ fonts = self :: get_google_fonts ( ) ; if ( array_key_exists ( $ font , $ fonts ) ) { $ variants = $ fonts [ $ font ] [ 'variants' ] ; } } if ( ! in_array ( 'regular' , $ variants ) ) { $ chosen_variants [ ] = $ variants [ 0 ] ; } else { $ chosen_variants [ ] = 'regular' ; } if ( in_array ( 'italic' , $ variants ) ) { $ chosen_variants [ ] = 'italic' ; } if ( in_array ( '300' , $ variants ) ) { $ chosen_variants [ ] = '300' ; } if ( in_array ( '700' , $ variants ) ) { $ chosen_variants [ ] = '700' ; } return apply_filters ( 'kirki/font/variants' , array_unique ( $ chosen_variants ) , $ font , $ variants ) ; }
Given a font, chose the variants to load for the theme.
Given a font chose the variants to load for the theme .
// If a "regular" variant is not found, get the first variant // Only add "italic" if it exists