instance( wpdb::class, $GLOBALS['wpdb'] ); foreach ( self::SHARED as $class_name ) { $container->singleton( $class_name ); } } /** * Returns the modules that attach callbacks to WordPress, in load order. * * Logging comes early, so a module that fails to start is itself something * the log can carry; REST authentication comes before the routes, so a bearer * token is resolved before any permission callback asks who the caller is. * * There is no translations module. WordPress has loaded a plugin's language * pack on first use since 4.6, and the plugin ships only a .pot, so calling * load_plugin_textdomain() here loaded nothing. * * @return array Class names implementing Hookable. */ public static function modules(): array { return array( SettingsRegistry::class, Assets::class, LogSubscriber::class, Migrator::class, Duplicator::class, OrphanCleaner::class, Notifier::class, Webhooks::class, Integrations::class, Admin::class, SettingsTransfer::class, Frontend::class, SubmissionHandler::class, StepHandler::class, Authentication::class, RestServer::class, ); } }