Feat: Render non-editable preview of navigation block when user does not have capability to edit navigation.#69806
Conversation
…e edit_post capability.
…'t have ability to edit navigation.
|
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. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @coder-rancho! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
In this case, I think it would be easier to test this enhancement if PRs are combined. |
|
Created separate PRs after reading this #58301 (comment) |
|
Changes related to this PR has been merged into #69855. |
Devnote
What?
Part of #60809. Built on top of #69794.
Adds a new non-editable mode to the Navigation block that renders the block list as disabled and non-editable.
Why?
This mode will be needed to render a preview of a template part for users that can view a template but not edit it.
How?
Adding a user capability check before rendering the editable Navigation block preview and for users that cannot edit it rendering an alternative locked down mode.
Testing Instructions
adminrole.editorrole.