Routing Infrastructure: Allow single routes to be added to WP-Admin separately#73137
Conversation
|
Size Change: +4.08 kB (+0.17%) Total Size: 2.41 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in ad26e3f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19235146403
|
a092217 to
ad26e3f
Compare
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Related #70862
What?
Adds
initSinglePage()function and wp-admin integrated page generation for the routing system.Why?
The existing page system (
page.php) takes over the entire admin screen with a custom sidebar. This PR enables pages to render within the standard WordPress admin interface, keeping the default wp-admin sidebar and navigation visible.I'm going to use this to replace the "posts" page experiment in a follow-up PR. Plugins can also use this to register one pages into wp-admin without any dedicated full screen takeover.
How?
initSinglePage()function that renders without the custom sidebarRootSinglePagecomponent (removes sidebar, keeps canvas support)rootComponentproppage.phpandpage-wp-admin.phpfor all pagespage-wp-admin.phpuses standard wp-admin rendering viaadmin_enqueue_scriptspquery parameterTesting Instructions
You can try by loading this page
http://localhost:8888/wp-admin/admin.php?page=gutenberg-boot-wp-admin&p=%2Ftypes%2Fpost%2Flist%2Fpending