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

Make SEO Dashboard available for all users #8067

Open
4 tasks
moorscode opened this issue Oct 16, 2017 · 1 comment
Open
4 tasks

Make SEO Dashboard available for all users #8067

moorscode opened this issue Oct 16, 2017 · 1 comment

Comments

@moorscode
Copy link
Contributor

As we introduced new capabilities, we also improved how the menu is registered.
This means that we can now, more easily, introduce the dashboard for all users.

We currently have the SEO Dashboard (notifications) hidden behind a wpseo_manage_options-wall.

To make this page available for all users a couple of things need to be implemented:

  • Set relevant capability for each notification
  • Make sure the notification count is filtered by applying filter_notification_current_user
  • Introduce capability for WPSEO_Option_Tab (default wpseo_manage_options)
  • Introduce capability check in WPSEO_Option_Tabs to only display tabs which can be shown for current user capabilities

Notification capabilities
Notifications can be registered with providing specific capability or capabilities that are required for the user to actually see the notification:

 * -     capabilities: Capabilities that a user must have for this Notification to show.
 * - capability_check: How to check capability pass: all or any.
@atimmer
Copy link
Contributor

atimmer commented Oct 16, 2017

In general a callable is much more useful when doing capability checks. You can of course do callable|string for the capability and when it is a string just do current_user_can('string'). But the implementation of the notification can also just provide a callable that does current_user_can('string').

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

3 participants