wp-staging
Last commit date
Backend
11 months ago
Backup
11 months ago
Basic
11 months ago
Core
11 months ago
Framework
11 months ago
Frontend
11 months ago
Notifications
1 year ago
Staging
11 months ago
assets
11 months ago
languages
1 year ago
resources
1 year ago
vendor_wpstg
11 months ago
views
11 months ago
CONTRIBUTING.md
1 year ago
Deactivate.php
11 months ago
README.md
1 year ago
SECURITY.md
2 years ago
autoloader.php
3 years ago
bootstrap.php
1 year ago
constantsFree.php
11 months ago
freeBootstrap.php
1 year ago
install.php
1 year ago
opcacheBootstrap.php
11 months ago
readme.txt
11 months ago
runtimeRequirements.php
1 year ago
uninstall.php
11 months ago
wp-staging-error-handler.php
1 year ago
wp-staging.php
11 months ago
autoloader.php
30 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 | function ($class) use ($class_map) { |
| 11 | if (isset($class_map[$class]) && file_exists($class_map[$class])) { |
| 12 | include_once $class_map[$class]; |
| 13 | |
| 14 | return true; |
| 15 | } |
| 16 | |
| 17 | return null; |
| 18 | }, |
| 19 | true, |
| 20 | true |
| 21 | ); |
| 22 | |
| 23 | $filesToInclude = include_once __DIR__ . '/vendor_wpstg/autoload/files.php'; |
| 24 | |
| 25 | foreach ($filesToInclude as $file) { |
| 26 | if (file_exists($file)) { |
| 27 | require $file; |
| 28 | } |
| 29 | } |
| 30 |