-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Global styles: Add check for edit CSS capability to overflow menu #47714
Conversation
Size Change: +84 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing this one @glendaviesnz 👍
It tests as advertised for me.
✅ Permissions check matches the one for the panel card
✅ Custom CSS feature works as expected for a normal site admin
✅ Testing as a site admin on a multisite, the Additional CSS option is not present in the panel or the menu
LGTM 🚢
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: 48dc739 |
What?
Adds a check for
edit-css
permissions to the Custom CSS overflow menuWhy?
The Custom CSS feature requires
edit-css
permissions. This is checked for in the display of the Custom CSS global styles panel, but was not copied over when the initial load of this was moved to the sub menu.For context:
unfiltered_html
capabilities.edit_css
capabilities and the experiment flag was removed #46815 & #47062.How?
Uses the same permissions check as the panel card
Testing Instructions
define( 'WP_ALLOW_MULTISITE', true );
and add a new site (using a subfolder is easiest option) and a site admin for that siteAdditional CSS
menu option is not availableScreenshots
Normal site admin:
Multi site admin: