Skip to content

Commit

Permalink
[mini] Preload: add post type (#67518)
Browse files Browse the repository at this point in the history
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
3 people authored Dec 3, 2024
1 parent 5c76815 commit 4d225cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backport-changelog/6.8/7695.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ https://github.com/WordPress/wordpress-develop/pull/7695
* https://github.com/WordPress/gutenberg/pull/67465
* https://github.com/WordPress/gutenberg/pull/66579
* https://github.com/WordPress/gutenberg/pull/66654
* https://github.com/WordPress/gutenberg/pull/67518
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

1 comment on commit 4d225cc

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 4d225cc.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12139553503
📝 Reported issues:

Please sign in to comment.