base !== 'plugins' || !current_user_can('activate_plugins')) { return; } $message = sprintf( /* translators: 1: minimum PHP version, 2: the site's PHP version */ __('PublishDeck needs PHP %1$s or newer, and this site runs PHP %2$s.', 'publishdeck'), FSPD_MIN_PHP, PHP_VERSION ); printf( '

%s %s

', esc_html($message), esc_html__('Ask your hosting provider to upgrade PHP, and PublishDeck will start working.', 'publishdeck') ); }; add_action('admin_notices', $fspd_php_notice); add_action('network_admin_notices', $fspd_php_notice); return; } // Autoloader: prefer Composer, else a minimal PSR-4 loader for PublishDeck\App\ and PublishDeck\Database\. if (file_exists(FSPD_PATH . 'vendor/autoload.php')) { require FSPD_PATH . 'vendor/autoload.php'; } else { spl_autoload_register(function ($class) { $prefixes = [ 'PublishDeck\\App\\' => FSPD_PATH . 'app/', 'PublishDeck\\Database\\' => FSPD_PATH . 'database/', ]; foreach ($prefixes as $prefix => $baseDir) { $prefixLength = strlen($prefix); if (strncmp($prefix, $class, $prefixLength) !== 0) { continue; } $file = $baseDir . str_replace('\\', '/', substr($class, $prefixLength)) . '.php'; if (is_readable($file)) { require $file; } return; } }); } require FSPD_PATH . 'boot/app.php';