-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
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
Classic themes: update the die handler to remove access to the Site Editor #68959
base: trunk
Are you sure you want to change the base?
Conversation
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. |
@youknowriad, @peterwilsoncc, similar condition should also be included in WordPress/wordpress-develop#7903. |
I think we should remove this condition entirely personally. All themes should have access to the site editor and the site editor should adapt to render what's available to them. This condition also makes it very hard to iterate on the site editor. |
I agree that it should, but the Site Editor pages does not do that right now. |
I think it's better to render a message like that maybe with an empty sidebar. Long term indeed, I don't see why this wouldn't show patterns, styles, template parts and custom block templates but that's a separate and larger effort indeed. (Also, just sharing a passing by opinion, feel free to continue with what you think is best) |
How about, trying to manage the permission in the Site Editor (navigation)pages directly and if that is not completed in time for 6.8, it can be done with the die handler if it absolutely has to. |
What?
Closes #68950
Updates
function gutenberg_styles_wp_die_handler
in the 6.8 Site Editor compatibility file to only allow access to patterns,and conditional access to the first page and the stylebook.
In this PR, I am using the existing condition for accessing the style book: the editor-styles theme support, or theme.json.
It does not include the changes proposed to the theme support. #68940
Why?
Users of classic themes had access to parts of the Site Editor that do not work with classic themes.
Help wanted
Should the pattern page available to all users? Or should I re-add
current_user_can( 'edit_theme_options' )
#61637
Testing Instructions
Activate a classic theme.
Go to wp-admin/site-editor.php?p=%2Ftemplate
Go to wp-admin/site-editor.php?p=%2Fpage
The screens should not be available and show a message saying that the theme is not compatible.
If the classic theme has added theme support for editor-styles:
Go to wp-admin/site-editor.php
Go to wp-admin/site-editor.php?p=stylebook
The screens should be available.