Skip to content

Commit

Permalink
Use wp_get_global_settings() instead of private API
Browse files Browse the repository at this point in the history
Changes the resolver to use wp_get_global_settings() instead of
the chained objects to get the merged data layer.

Reference:
WordPress/gutenberg#53805

Props @oandregal.
  • Loading branch information
hellofromtonya committed Aug 23, 2023
1 parent f9b020d commit e1da7ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class WP_Font_Face_Resolver {
* @return array Returns the font-families, each with their font-face variations.
*/
public static function get_fonts_from_theme_json() {
$settings = WP_Theme_JSON_Resolver::get_merged_data()->get_settings();
$settings = wp_get_global_settings();

// Bail out early if there are no font settings.
if ( empty( $settings['typography'] ) || empty( $settings['typography']['fontFamilies'] ) ) {
Expand Down

0 comments on commit e1da7ab

Please sign in to comment.