Support
2 months ago
Action.php
2 months ago
Cacheable.php
2 months ago
Capability.php
2 months ago
CastAttribute.php
2 months ago
Constant.php
2 months ago
Container.php
2 months ago
Discoverable.php
2 months ago
Event.php
2 months ago
Executor.php
3 weeks ago
Exportable.php
2 months ago
Importable.php
2 months ago
Middleware.php
2 months ago
Migration.php
2 months ago
Parser.php
2 months ago
Registrable.php
2 months ago
Request.php
3 weeks ago
Response.php
2 months ago
RewriteRule.php
2 months ago
Rule.php
2 months ago
ServiceProvider.php
2 months ago
Shortcode.php
2 months ago
SomoyInterface.php
1 month ago
Uploader.php
2 months ago
Capability.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Contract for WordPress capability management actions. |
| 5 | * Requires handle logic plus a method to retrieve capability slugs, optionally filtered by role. |
| 6 | * Used by hooks that register or sync custom capabilities. |
| 7 | * |
| 8 | * @package Framework |
| 9 | * @subpackage Contracts |
| 10 | * @since 1.0.0 |
| 11 | */ |
| 12 | namespace Kirki\Framework\Contracts; |
| 13 | |
| 14 | \defined('ABSPATH') || exit; |
| 15 | interface Capability |
| 16 | { |
| 17 | /** |
| 18 | * Execute the action logic. |
| 19 | * |
| 20 | * @return void |
| 21 | * |
| 22 | * @since 1.0.0 |
| 23 | */ |
| 24 | public function handle(); |
| 25 | /** |
| 26 | * Get the capabilities . |
| 27 | * |
| 28 | * @param mixed $role The role. |
| 29 | * |
| 30 | * @return array |
| 31 | * |
| 32 | * @since 1.0.0 |
| 33 | */ |
| 34 | public function get_capabilities($role = null); |
| 35 | } |
| 36 |