golden hour
/home/godaofbq/bioredlite.com/wp-content/plugins/essential-blocks
⬆️ Go Up
Upload
File/Folder
Size
Actions
assets
-
Del
OK
autoload.php
1.06 KB
Del
OK
essential-blocks.php
765 B
Del
OK
includes
-
Del
OK
languages
-
Del
OK
readme.txt
24.27 KB
Del
OK
src
-
Del
OK
templates
-
Del
OK
views
-
Del
OK
wpml-config.xml
3.68 KB
Del
OK
Edit: autoload.php
<?php spl_autoload_register(function ($class) { // project-specific namespace prefix $prefix = 'EssentialBlocks\\'; // base directory for the namespace prefix $base_dir = __DIR__ . '/includes/'; // does the class use the namespace prefix? $len = strlen($prefix); if (strncmp($prefix, $class, $len) !== 0) { // no, move to the next registered autoloader return; } /** * This is for blocks autoloading. */ // $class_array = explode('\\', $class); // if( ! empty( $class_array[1] ) && $class_array[1] === 'blocks' ) { // $base_dir = __DIR__ . '/'; // } // get the relative class name $relative_class = substr($class, $len); // replace the namespace prefix with the base directory, replace namespace // separators with directory separators in the relative class name, append // with .php $file = $base_dir . str_replace('\\', DIRECTORY_SEPARATOR, $relative_class) . '.php'; // if the file exists, require it if (file_exists($file)) { require $file; } });
Save