Command Palette: Disable site editor navigation commands on Network Admin - Take 2#72698
Command Palette: Disable site editor navigation commands on Network Admin - Take 2#72698
Conversation
|
Size Change: -27 B (0%) Total Size: 2.37 MB
ℹ️ View Unchanged
|
|
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. |
ntsekouras
left a comment
There was a problem hiding this comment.
This seems way more reliable. Thanks!
|
@ntsekouras Thanks for the review! |
|
Flaky tests detected in 22f2eaa. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18902807045
|
…dmin - Take 2 (#72698) * Command Palette: Disable site editor navigation commands on Network Admin * Add backport changelog Co-authored-by: t-hamano <[email protected]> Co-authored-by: ntsekouras <[email protected]>
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: 9912d9f |
Follow-up #72572
What?
This pull request checks on the server side whether the current screen is Network Admin, and disables the site editor navigation commands accordingly.
Why?
We disabled the site editor navigation commands on the network admin screen by checking whether the pathname starts with
wp-admin/networkor not. However, the pathname for a multisite installation doesn't necessarily always start with "hoge". The site may be located in a subdirectory.How?
Pass the result of
is_network_adminas an argument to theinitializeCommandPalettefunction, and disable commands based on that value.Testing Instructions
Screenshots or screencast