Skip to content

Commit

Permalink
Preload: add post type
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 3, 2024
1 parent 5900cf6 commit 87955ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/compat/wordpress-6.8/preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function gutenberg_block_editor_preload_paths_6_8( $paths, $context ) {
$route_for_post = rest_get_route_for_post( $post );
if ( $route_for_post ) {
$paths[] = add_query_arg( 'context', 'edit', $route_for_post );
$paths[] = add_query_arg( 'context', 'edit', '/wp/v2/types/' . $post->post_type );
if ( 'page' === $post->post_type ) {
$paths[] = add_query_arg(
'slug',
Expand Down

0 comments on commit 87955ce

Please sign in to comment.