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
Currently, Block Visibility allows displaying blocks based on various criteria, such as user roles, page types, etc. However, it lacks the ability to control block visibility based on user capabilities. This limitation can be problematic when you want to display certain blocks only to users with specific permissions, regardless of their role.
What is your proposed solution?
Introduce a new capability-based option for displaying blocks. This option would allow users to specify a capability (e.g., "read_premium_posts") and only display the block if the current user has that capability.
Example:
Capability Field: Provide a field to input the desired capability slug (e.g., "read_premium_posts").
The text was updated successfully, but these errors were encountered:
This should be relatively easy to add, but there are a lot of user capabilities in WordPress. Do you imagine this being a dropdown containing all Core capabilities or a text field? A text field is not as user-friendly, but this would allow BV to support custom capabilities. 🤔
I’d go with a text field. It’s cleaner and supports custom capabilities. Maybe adding autocomplete for core capabilities could make it more user-friendly?
What problem does this address?
Currently, Block Visibility allows displaying blocks based on various criteria, such as user roles, page types, etc. However, it lacks the ability to control block visibility based on user capabilities. This limitation can be problematic when you want to display certain blocks only to users with specific permissions, regardless of their role.
What is your proposed solution?
Introduce a new capability-based option for displaying blocks. This option would allow users to specify a capability (e.g., "read_premium_posts") and only display the block if the current user has that capability.
Example:
The text was updated successfully, but these errors were encountered: