| @@ -15,8 +15,12 @@ | ||
| 15 | 15 | register_activation_hook( TEMPLATELY_PLUGIN_BASENAME, [ __CLASS__, 'activation' ] ); |
| 16 | 16 | register_uninstall_hook( TEMPLATELY_PLUGIN_BASENAME, [ __CLASS__, 'uninstall' ] ); |
| 17 | 17 | register_deactivation_hook( TEMPLATELY_PLUGIN_BASENAME, [ __CLASS__, 'deactivation' ] ); |
| 18 | 18 | add_action( 'admin_init', [ __CLASS__, 'maybe_redirect_templately' ] ); |
| 19 | + | |
| 20 | + // Runtime capability hooks — setup() only ever runs on activation, so the | |
| 21 | + // administrator grant needs a home that runs on every request. | |
| 22 | + Roles::init(); | |
| 19 | 23 | } |
| 20 | 24 | |
| 21 | 25 | /** |
| 22 | 26 | * Runs on activation |