Capabilities.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Plugin\Install; |
| 6 | |
| 7 | use AC; |
| 8 | use WP_Roles; |
| 9 | |
| 10 | final class Capabilities implements AC\Plugin\Install |
| 11 | { |
| 12 | public function install(): void |
| 13 | { |
| 14 | global $wp_roles; |
| 15 | |
| 16 | if (! $wp_roles) { |
| 17 | $wp_roles = new WP_Roles(); |
| 18 | } |
| 19 | |
| 20 | do_action('ac/capabilities/init', $wp_roles); |
| 21 | } |
| 22 | |
| 23 | } |
| 24 |