From 3c112a6e1bfb65274c432e8cc874d5f2c6514fd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=83=C2=A9?= Date: Wed, 26 Apr 2023 14:25:19 +0000 Subject: [PATCH] Themes: remove unused parameter in query for `get_block_templates()`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the `theme` parameter from the query passed to `get_block_templates()`. It is not used or documented. This removal doesn't have any effect in the code, as the data is ignored anyway. Props draganescu, audrasjb, davidbaumwald, hellofromTonya. Fixes #57736. git-svn-id: https://develop.svn.wordpress.org/trunk@55686 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-template.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php index 10434dacb1..6a8b521f9d 100644 --- a/src/wp-includes/block-template.php +++ b/src/wp-includes/block-template.php @@ -145,7 +145,6 @@ function resolve_block_template( $template_type, $template_hierarchy, $fallback_ // Find all potential templates 'wp_template' post matching the hierarchy. $query = array( - 'theme' => get_stylesheet(), 'slug__in' => $slugs, ); $templates = get_block_templates( $query );