Skip to content
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

Introduce user_has_cap filter #8055

Open
moorscode opened this issue Oct 13, 2017 · 1 comment
Open

Introduce user_has_cap filter #8055

moorscode opened this issue Oct 13, 2017 · 1 comment

Comments

@moorscode
Copy link
Contributor

When we use the user_has_cap filter to add the "sub" level capabilities (anything other than wpseo_manage_options) when the user has the wpseo_manage_options capability, we can throw away the WPSEO_Capability_Utils and just use the current_user_can function to handle all capabilities.

When removing the WPSEO_Capability_Utils from the code, also make sure these are removed in Premium.

Example code for wpseo_manage_redirects can be found in the following commit:
https://github.com/Yoast/wordpress-seo-premium/pull/1386/commits/d6f509f50c692ac2320666d7eab17ece4f0bf77f

@atimmer
Copy link
Contributor

atimmer commented Oct 20, 2017

Consider using map_meta_cap. This is the way WordPress map different capabilities onto eachother.

@moorscode moorscode added backlog and removed queue labels Nov 13, 2017
@Djennez Djennez removed the backlog label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants