-
Notifications
You must be signed in to change notification settings - Fork 37
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
[New Sniff] Check that capabilities are used not roles #27
Comments
I have essentially got this sniff done, but need a little more time for testing. |
Is this only regarding adding menu pages, or other usages too? |
This should be for all usages |
Theme check file (partially) covering this rule:https://github.com/Otto42/theme-check/blob/master/checks/admin_menu.php |
Also in the handbook (related but not the same):
https://make.wordpress.org/themes/handbook/review/required/#options-and-settings |
the sniff I have created is for all pages. |
In the new Theme handbook, the rule has been moved to another section: |
Created a PR upstream for this WordPress/WordPress-Coding-Standards#1364 |
@grappler Any news on the upstream issue for this? |
[New Sniff]
Rule:
ERROR : Check that capabilities are used not roles. Functions to check: get_role(), current_user_can(), current_user_can_for_blog(), user_can(), add_..._page()
Ref: https://make.wordpress.org/themes/handbook/review/required/#core-functionality-and-features
To do:
The text was updated successfully, but these errors were encountered: