From 2c8e618bc423c2861b1280b68e892fe38d305b3e Mon Sep 17 00:00:00 2001 From: Jonny Harris Date: Tue, 14 Feb 2023 11:48:30 +0000 Subject: [PATCH] Disable lazy loading get_block_templates. (#47999) --- lib/compat/wordpress-6.1/block-template-utils.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/compat/wordpress-6.1/block-template-utils.php b/lib/compat/wordpress-6.1/block-template-utils.php index 928291b500084e..5423b8cd29abd2 100644 --- a/lib/compat/wordpress-6.1/block-template-utils.php +++ b/lib/compat/wordpress-6.1/block-template-utils.php @@ -76,11 +76,12 @@ function gutenberg_get_block_templates( $query = array(), $template_type = 'wp_t $post_type = isset( $query['post_type'] ) ? $query['post_type'] : ''; $wp_query_args = array( - 'post_status' => array( 'auto-draft', 'draft', 'publish' ), - 'post_type' => $template_type, - 'posts_per_page' => -1, - 'no_found_rows' => true, - 'tax_query' => array( + 'post_status' => array( 'auto-draft', 'draft', 'publish' ), + 'post_type' => $template_type, + 'posts_per_page' => -1, + 'no_found_rows' => true, + 'lazy_load_term_meta' => false, + 'tax_query' => array( array( 'taxonomy' => 'wp_theme', 'field' => 'name',