Skip to content

Commit

Permalink
Fix template lookup preloading for non-draft pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Mar 4, 2025
1 parent 60c1caf commit bf48f57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-admin/site-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static function ( $classes ) {
$preload_paths[] = add_query_arg(
'slug',
// @see https://github.com/WordPress/gutenberg/blob/e093fefd041eb6cc4a4e7f67b92ab54fd75c8858/packages/core-data/src/private-selectors.ts#L244-L254
'page-' . $block_editor_context->post->post_name,
empty( $block_editor_context->post->post_name ) ? 'page' : 'page-' . $post->post_name,
'/wp/v2/templates/lookup'
);
}
Expand Down

0 comments on commit bf48f57

Please sign in to comment.