-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Site Editor: Update preloaded paths #7270
Site Editor: Update preloaded paths #7270
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN:
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Trac Ticket MissingThis pull request is missing a link to a Trac ticket. For a contribution to be considered, there must be a corresponding ticket in Trac. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description. More information about contributing to WordPress on GitHub can be found in the Core Handbook. |
@@ -88,7 +88,8 @@ static function ( $classes ) { | |||
); | |||
|
|||
$preload_paths = array( | |||
array( '/wp/v2/media', 'OPTIONS' ), | |||
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoids hardcoding paths. Matches the post editor.
array( rest_get_route_for_post_type_items( 'attachment' ), 'OPTIONS' ), |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
@Mamaduka: Thanks for the PR! Please add a Trac ticket and put it in the 6.7 milestone so that folks will find this and review it ❤️ |
@noisysocks, I re-opened a similar ticket I had for 6.7. |
@noisysocks, does this need another review/approval? It has been approved by @gziolo in the Gutenberg repo. |
You're a core committer so technically you can commit without review 😛 Best practice is to get a second pair of eyes on it though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me 👍
Committed in https://core.trac.wordpress.org/changeset/58984. |
Matches the preloaded path for the posts editor and hopefully will improve the Site Editor loading time a bit.
Gutenberg Issue: WordPress/gutenberg#64890
Trac ticket: https://core.trac.wordpress.org/ticket/61884