premium-addons-for-elementor
Last commit date
addons
5 months ago
admin
5 months ago
assets
5 months ago
includes
5 months ago
languages
5 months ago
modules
5 months ago
widgets
5 months ago
autoload.php
5 months ago
changelog.txt
5 months ago
premium-addons-for-elementor.php
5 months ago
readme.txt
5 months ago
wpml-config.xml
5 months ago
autoload.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | spl_autoload_register( function( $class ) { |
| 4 | |
| 5 | if ( 0 !== strpos( $class, 'PremiumAddons' ) ) { |
| 6 | return; |
| 7 | } |
| 8 | |
| 9 | $class_to_load = $class; |
| 10 | |
| 11 | $filename = strtolower( |
| 12 | preg_replace( |
| 13 | array( '/^PremiumAddons\\\/', '/([a-z])([A-Z])/', '/_/', '/\\\/' ), |
| 14 | array( '', '$1-$2', '-', DIRECTORY_SEPARATOR ), |
| 15 | $class_to_load |
| 16 | ) |
| 17 | ); |
| 18 | |
| 19 | $filename = PREMIUM_ADDONS_PATH . $filename . '.php'; |
| 20 | |
| 21 | if ( is_readable( $filename ) ) { |
| 22 | require_once $filename; |
| 23 | } |
| 24 | |
| 25 | }); |
| 26 |