wp-staging
Last commit date
Backend
3 months ago
Backup
3 months ago
Basic
3 months ago
Component
6 months ago
Core
3 months ago
Framework
3 months ago
Frontend
5 months ago
Notifications
8 months ago
Staging
3 months ago
assets
3 months ago
languages
3 months ago
resources
1 year ago
vendor_wpstg
3 months ago
views
3 months ago
CONTRIBUTING.md
2 years ago
Deactivate.php
8 months ago
README.md
3 months ago
SECURITY.md
2 years ago
autoloader.php
6 months ago
bootstrap.php
9 months ago
constantsFree.php
3 months ago
freeBootstrap.php
1 year ago
install.php
1 year ago
opcacheBootstrap.php
3 months ago
readme.txt
3 months ago
runtimeRequirements.php
3 months ago
uninstall.php
3 months ago
wp-staging-error-handler.php
6 months ago
wp-staging.php
3 months ago
autoloader.php
29 lines
| 1 | <?php |
| 2 | |
| 3 | // Register the autoloader for the plugin source code, and for the prefixed vendors. |
| 4 | $class_map = array_merge( |
| 5 | include_once __DIR__ . '/vendor_wpstg/autoload/src.php', |
| 6 | include_once __DIR__ . '/vendor_wpstg/autoload/vendor.php' |
| 7 | ); |
| 8 | |
| 9 | spl_autoload_register( |
| 10 | // @phpstan-ignore-next-line - Autoloader return value preserved for compatibility |
| 11 | function (string $class) use ($class_map) { |
| 12 | if (isset($class_map[$class]) && file_exists($class_map[$class])) { |
| 13 | include_once $class_map[$class]; |
| 14 | |
| 15 | return true; |
| 16 | } |
| 17 | }, |
| 18 | true, |
| 19 | true |
| 20 | ); |
| 21 | |
| 22 | $filesToInclude = include_once __DIR__ . '/vendor_wpstg/autoload/files.php'; |
| 23 | |
| 24 | foreach ($filesToInclude as $file) { |
| 25 | if (file_exists($file)) { |
| 26 | require $file; |
| 27 | } |
| 28 | } |
| 29 |