Skip to content

Commit

Permalink
Replace usage of wp_get_theme()->get_stylesheet() with get_stylesheet…
Browse files Browse the repository at this point in the history
…() (#48027)
  • Loading branch information
spacedmonkey committed Feb 14, 2023
1 parent 1d3c2f7 commit 7a8a44a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.1/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function gutenberg_get_block_templates( $query = array(), $template_type = 'wp_t
}

$is_not_custom = false === array_search(
wp_get_theme()->get_stylesheet() . '//' . $template_file['slug'],
get_stylesheet() . '//' . $template_file['slug'],
array_column( $query_result, 'id' ),
true
);
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function render_block_core_template_part( $attributes ) {
if (
isset( $attributes['slug'] ) &&
isset( $attributes['theme'] ) &&
wp_get_theme()->get_stylesheet() === $attributes['theme']
get_stylesheet() === $attributes['theme']
) {
$template_part_id = $attributes['theme'] . '//' . $attributes['slug'];
$template_part_query = new WP_Query(
Expand Down

1 comment on commit 7a8a44a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 7a8a44a.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4177923538
📝 Reported issues:

Please sign in to comment.