We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With the new ability to lock blocks in the site editor, we should lock all of the blocks we know we don't want anyone to modify.
This code disables moving or removing blocks when you add it to the block code in the theme.
"lock":{"move":true,"remove":true}
Here's an example used in a block:
<!-- wp:template-part {"slug":"header-global","theme":"theme-ucsc","lock":{"move":true,"remove":true}} /-->
The text was updated successfully, but these errors were encountered:
WordPress 6.0 has proper API hooks and filters to set access/permissions for block locking.
https://developer.wordpress.org/block-editor/how-to-guides/curating-the-editor-experience/
You can also limited access to the code editor.
Sorry, something went wrong.
feat: ✅ Theme filter to prevent site managers from moving or removing…
77de82a
… global blocks. Fixes #19
6c8d619
knice
No branches or pull requests
With the new ability to lock blocks in the site editor, we should lock all of the blocks we know we don't want anyone to modify.
This code disables moving or removing blocks when you add it to the block code in the theme.
Here's an example used in a block:
<!-- wp:template-part {"slug":"header-global","theme":"theme-ucsc","lock":{"move":true,"remove":true}} /-->
The text was updated successfully, but these errors were encountered: