From ace511a96ccd3d2cdc3670a7e943d30946a4c97f Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Wed, 13 May 2020 16:35:08 +0200 Subject: [PATCH] No assoc array needed --- lib/templates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/templates.php b/lib/templates.php index 9336cf44717cf..af41251f720dc 100644 --- a/lib/templates.php +++ b/lib/templates.php @@ -194,10 +194,10 @@ function filter_rest_wp_template_query( $args, $request ) { $current_template = gutenberg_find_template_post_and_parts( $template_type ); if ( isset( $current_template ) ) { - $template_ids[ $current_template['template_post']->post_name ] = $current_template['template_post']->ID; + $template_ids[] = $current_template['template_post']->ID; } } - $args['post__in'] = array_values( $template_ids ); + $args['post__in'] = $template_ids; } return $args;