=' ) && is_readable( FORMPILOT_PLUGIN_DIR . 'vendor/autoload.php' ) ) { require_once FORMPILOT_PLUGIN_DIR . 'vendor/autoload.php'; return; } spl_autoload_register( /** * Minimal PSR-4 autoloader for the FormPilot namespace. * * @param string $class_name Fully qualified class name. * * @return void */ static function ( string $class_name ): void { $prefix = 'FormPilot\\'; $base_dir = FORMPILOT_PLUGIN_DIR . 'src/'; $length = strlen( $prefix ); if ( 0 !== strncmp( $prefix, $class_name, $length ) ) { return; } $relative = substr( $class_name, $length ); $file = $base_dir . str_replace( '\\', '/', $relative ) . '.php'; if ( is_readable( $file ) ) { require_once $file; } } );