singleton( Activator::class, static fn ( Container $c ): Activator => new Activator( $c->get( Migrator::class ) ) ); $container->singleton( Deactivator::class, static fn (): Deactivator => new Deactivator() ); $container->singleton( PageProvisioner::class, static fn (): PageProvisioner => new PageProvisioner() ); } /** * Wire the core cross-cutting hooks. * * @since 1.0.0 * * @param Container $container The shared plugin container. * @return void */ public function boot( Container $container ): void { // Restore capabilities removed by a role editor or migration. add_action( 'init', array( Capabilities::class, 'ensure' ), 5 ); // Provision pages on init, after post types and blocks load. $container->get( PageProvisioner::class )->hooks(); } }