WP_Font_Face_Resolver::get_fonts_from_theme_json(): array

In this article

Gets fonts defined in theme.json.

Return

array Returns the font-families, each with their font-face variations.

Source

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 );
}

Changelog

VersionDescription
6.4.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.