WP_Font_Face_Resolver::get_fonts_from_theme_json()
Gets fonts defined in theme.json.
Метод класса: WP_Font_Face_Resolver{}
Хуков нет.
Возвращает
Массив
. Returns the font-families, each with their font-face variations.
Использование
$result = WP_Font_Face_Resolver::get_fonts_from_theme_json();
Список изменений
С версии 6.4.0 | Введена. |
Код WP_Font_Face_Resolver::get_fonts_from_theme_json() WP Font Face Resolver::get fonts from theme json WP 6.7.1
public static function get_fonts_from_theme_json() { $settings = wp_get_global_settings(); // Bail out early if there are no font settings. if ( empty( $settings['typography']['fontFamilies'] ) ) { return array(); } return static::parse_settings( $settings ); }