Editor: Disable lazy loading term meta in `get_block_templates`.
Pass false to the `lazy_load_term_meta` parameter given to the `WP_Query` found in `get_block_templates`. Template post types only ever have one term assigned to them. So priming term meta, does not help performance as lazy loading term meta is only useful if loading multiple terms. As `get_block_templates` is run multiple times on a block theme request, this saves processing time. Props spacedmonkey, andraganescu, ntsekouras, oandregal, westonruter. Fixes #58230. Built from https://develop.svn.wordpress.org/trunk@55817 git-svn-id: http://core.svn.wordpress.org/trunk@55329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1aeba57f4b
commit
2949e05862
|
@ -952,11 +952,12 @@ function get_block_templates( $query = array(), $template_type = 'wp_template' )
|
|||
|
||||
$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',
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.3-alpha-55816';
|
||||
$wp_version = '6.3-alpha-55817';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue