PluginProbe ʕ •ᴥ•ʔ
Transferito: WP Migration / trunk
Transferito: WP Migration vtrunk
trunk 11.4.0 12.0.0 13.1.0 14.0.0 14.0.11 14.0.7 14.1.0 14.1.1 14.1.2 14.1.3 14.1.4
transferito / core / TransferitoAutoLoader.php
transferito / core Last commit date
TransferitoAutoLoader.php 8 years ago helperFunctions.php 10 months ago
TransferitoAutoLoader.php
23 lines
1 <?php
2
3 class TransferitoAutoLoader {
4
5 static public function load($className)
6 {
7 $filename = "src/" . str_replace('\\', '/', $className) . ".php";
8 $updatedFilename = str_replace("Transferito/", "", $filename);
9 $fullPath = plugin_dir_path( __DIR__ ) . "" . $updatedFilename;
10
11 if (file_exists($fullPath)) {
12 include($fullPath);
13 if (class_exists($className)) {
14 return true;
15 }
16 }
17 return false;
18 }
19
20 }
21
22 spl_autoload_register('TransferitoAutoLoader::load');
23