Skip to content

Commit

Permalink
Move gutenberg_get_remote_theme_patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed May 12, 2023
1 parent 5ef52d5 commit 1a7bab1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 0 additions & 12 deletions lib/compat/wordpress-6.3/get-global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,6 @@ function wp_get_block_css_selector( $block_type, $target = 'root', $fallback = f
}
}

/**
* Returns the current theme's wanted patterns(slugs) to be
* registered from Pattern Directory.
*
* @since 6.3.0
*
* @return string[]
*/
function gutenberg_get_remote_theme_patterns() {
return WP_Theme_JSON_Resolver_Gutenberg::get_theme_data( array(), array( 'with_supports' => false ) )->get_patterns();
}

/**
* Gets the styles resulting of merging core, theme, and user data.
*
Expand Down
12 changes: 12 additions & 0 deletions lib/global-styles-and-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,15 @@ function _gutenberg_clean_theme_json_caches() {
}
add_action( 'start_previewing_theme', '_gutenberg_clean_theme_json_caches' );
add_action( 'switch_theme', '_gutenberg_clean_theme_json_caches' );

/**
* Returns the current theme's wanted patterns(slugs) to be
* registered from Pattern Directory.
*
* @since 6.3.0
*
* @return string[]
*/
function gutenberg_get_remote_theme_patterns() {
return WP_Theme_JSON_Resolver_Gutenberg::get_theme_data( array(), array( 'with_supports' => false ) )->get_patterns();
}

0 comments on commit 1a7bab1

Please sign in to comment.