Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/fluentformpro/autoload.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
defined('ABSPATH') or die;
3
+
4
+
spl_autoload_register(function ($class) {
5
+
$namespace = 'FluentFormPro';
6
+
7
+
if (substr($class, 0, strlen($namespace)) !== $namespace) {
8
+
return;
9
+
}
10
+
11
+
$className = str_replace(
12
+
array('\\', $namespace, strtolower($namespace)),
13
+
array('/', 'src', ''),
14
+
$class
15
+
);
16
+
17
+
$basePath = plugin_dir_path(__FILE__);
18
+
19
+
$file = $basePath.trim($className, '/').'.php';
20
+
21
+
if (is_readable($file)) {
22
+
include $file;
23
+
}
24
+
});
25
+