Skip to content

Build: Support Core *.php pages (screen id) when rendering single separate pages - #74113

Merged
youknowriad merged 1 commit into
trunkfrom
update/build-support-wp-core
Dec 18, 2025
Merged

youknowriad merged 1 commit into
trunkfrom
update/build-support-wp-core

Conversation

@youknowriad

Copy link
Copy Markdown
Contributor

Related #72032
Related WordPress/wordpress-develop#10638

What?

Use get_current_screen() for generic page detection in wp-admin pages
This PR updates the page-wp-admin.php template to check both $_GET['page'] and get_current_screen()->id for page detection. This allows the same code to work in both Gutenberg plugin context (menu page access) and WordPress Core context (direct file access) without requiring transformations.

@youknowriad youknowriad self-assigned this Dec 18, 2025
@youknowriad youknowriad added the [Type] Build Tooling Issues or PRs related to build tooling label Dec 18, 2025
@github-actions

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: youknowriad <youknowriad@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@youknowriad
youknowriad merged commit b79bbe2 into trunk Dec 18, 2025
37 of 38 checks passed
@youknowriad
youknowriad deleted the update/build-support-wp-core branch December 18, 2025 21:55
@github-actions github-actions Bot added this to the Gutenberg 22.4 milestone Dec 18, 2025
@jsnajdr

jsnajdr commented Dec 19, 2025

Copy link
Copy Markdown
Member

@youknowriad The e2e failure on this PR was not random, fixing in 44cc468

@youknowriad

Copy link
Copy Markdown
Contributor Author

Yes, but I don't believe it's related to this PR.

@jsnajdr

jsnajdr commented Dec 19, 2025

Copy link
Copy Markdown
Member

Yes, but I don't believe it's related to this PR.

It is. Checkout this PR's commit in trunk, the preload.spec.php test fails. Checkout the previous commit, it succeeds. Very reliable.

@youknowriad

Copy link
Copy Markdown
Contributor Author

Very weird :) Sorry about that.

@jsnajdr

jsnajdr commented Dec 19, 2025

Copy link
Copy Markdown
Member

No worries, it's now fixed in trunk after #73822 got merged 🙂 Although there is probably one more failing e2e test, template-id-format.spec.js. But here I don't know which PR caused it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Build Tooling Issues or PRs related to build tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants