PluginProbe
Microthemer Lite – Visual Editor to Customize CSS / trunk
Microthemer Lite – Visual Editor to Customize CSS vtrunk
trunk 5.0.0.2
microthemer / src / autoload.php

autoload.php in Microthemer Lite – Visual Editor to Customize CSS trunk, at src/autoload.php

25 lines 452 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 // Simple autoloader
8 spl_autoload_register(function ($class) {
9
10 $prefix = 'Microthemer\\';
11 $base_dir = dirname(__FILE__) . '/';
12 $len = strlen($prefix);
13
14 if (strncmp($prefix, $class, $len) !== 0) {
15 return;
16 }
17
18 $relative_class = substr($class, $len);
19 $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
20
21 if (file_exists($file)) {
22 require $file;
23 }
24
25 });