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

Add Capability-Based Block Display Options #118

Open
qarayahya opened this issue Nov 20, 2024 · 0 comments
Open

Add Capability-Based Block Display Options #118

qarayahya opened this issue Nov 20, 2024 · 0 comments

Comments

@qarayahya
Copy link

qarayahya commented Nov 20, 2024

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:

  • Capability Field: Provide a field to input the desired capability slug (e.g., "read_premium_posts").
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant