PHP Class Kirki_Fonts, kirki

Mostrar archivo Open project: aristath/kirki Class Usage Examples

Public Properties

Property Type Description
$google_fonts null | object An array of our google fonts.
$mode string This is a todo item, not yet functional.

Public Methods

Method Description
get_all_fonts ( ) : array Compile font options from different sources.
get_all_variants ( ) : array Returns an array of all available variants.
get_backup_fonts ( ) : array Return an array of backup fonts based on the font-category
get_font_choices ( ) : array Gets available options for a font.
get_google_font_subsets ( ) : array Returns an array of all available subsets.
get_google_font_uri ( ) Dummy function to avoid issues with backwards-compatibility.
get_google_fonts ( ) : array Return an array of all available Google Fonts.
get_instance ( ) : object Get the one, true instance of this class.
get_standard_fonts ( ) : array Return an array of standard websafe fonts.
is_google_font ( string $fontname ) : boolean Determine if a font-name is a valid google font or not.

Private Methods

Method Description
__construct ( ) The class constructor.

Method Details

get_all_fonts() public static method

Compile font options from different sources.
public static get_all_fonts ( ) : array
return array All available fonts.

get_all_variants() public static method

Returns an array of all available variants.
public static get_all_variants ( ) : array
return array

get_backup_fonts() public static method

Return an array of backup fonts based on the font-category
public static get_backup_fonts ( ) : array
return array

get_font_choices() public static method

Gets available options for a font.
public static get_font_choices ( ) : array
return array

get_google_font_subsets() public static method

Returns an array of all available subsets.
public static get_google_font_subsets ( ) : array
return array

get_google_font_uri() public static method

This is not functional, but it will prevent PHP Fatal errors.
public static get_google_font_uri ( )

get_google_fonts() public static method

Return an array of all available Google Fonts.
public static get_google_fonts ( ) : array
return array All Google Fonts.

get_instance() public static method

Prevents performance issues since this is only loaded once.
public static get_instance ( ) : object
return object Kirki_Fonts

get_standard_fonts() public static method

Return an array of standard websafe fonts.
public static get_standard_fonts ( ) : array
return array Standard websafe fonts.

is_google_font() public static method

Determine if a font-name is a valid google font or not.
public static is_google_font ( string $fontname ) : boolean
$fontname string The name of the font we want to check.
return boolean

Property Details

$google_fonts public_oe static_oe property

An array of our google fonts.
public static null|object $google_fonts
return null | object

$mode public_oe static_oe property

This is a todo item, not yet functional.
public static string $mode
return string