app/. */ $fxlc_composer = FXLC_PATH . 'vendor/autoload.php'; if ( is_readable( $fxlc_composer ) ) { require $fxlc_composer; } else { spl_autoload_register( static function ( string $fqcn ): void { $prefix = 'FlexaLocal\\'; $length = strlen( $prefix ); if ( 0 !== strncmp( $fqcn, $prefix, $length ) ) { return; } $relative = substr( $fqcn, $length ); $file = FXLC_PATH . 'app/' . str_replace( '\\', '/', $relative ) . '.php'; if ( is_readable( $file ) ) { require $file; } } ); } // The add-ons that ship in addons/, each switched on as a module. Included // here, before plugins_loaded, because each one boots on that hook as it did // when it was a plugin of its own. \FlexaLocal\Addons\AddonLoader::load(); // The optional deactivation survey. Loaded with the plugin file, not on a hook, // so this copy of the shared SDK is counted when the newest copy is chosen. \FlexaLocal\Admin\DeactivationSurvey::load(); register_activation_hook( __FILE__, [ \FlexaLocal\Install\Activator::class, 'activate' ] ); register_deactivation_hook( __FILE__, [ \FlexaLocal\Install\Deactivator::class, 'deactivate' ] ); add_action( 'plugins_loaded', static function (): void { \FlexaLocal\Core\Plugin::instance()->boot(); } );