Make WordPress Core


Ignore:
Timestamp:
06/16/2023 08:06:30 AM (9 months ago)
Author:
oandregal
Message:

Themes: add wp_get_remote_theme_patterns function.

Adds a new public function, wp_get_remote_theme_patterns to query the patterns datum from theme.json and substitutes current usage of private APIs.

Props ntsekouras, poena, audrasjb.
Fixes #58460

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-patterns.php

    r55234 r55926  
    288288    }
    289289
    290     $pattern_settings = WP_Theme_JSON_Resolver::get_theme_data()->get_patterns();
     290    $pattern_settings = wp_get_remote_theme_patterns();
    291291    if ( empty( $pattern_settings ) ) {
    292292        return;
Note: See TracChangeset for help on using the changeset viewer.