You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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').
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:
filter_notification_current_user
WPSEO_Option_Tab
(defaultwpseo_manage_options
)WPSEO_Option_Tabs
to only display tabs which can be shown for current user capabilitiesNotification capabilities
Notifications can be registered with providing specific capability or capabilities that are required for the user to actually see the notification:
The text was updated successfully, but these errors were encountered: