-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathautoloader.php
More file actions
27 lines (21 loc) · 917 Bytes
/
autoloader.php
File metadata and controls
27 lines (21 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* @package EmbedPress
* @author EmbedPress <help@embedpress.com>
* @copyright Copyright (C) 2023 WPDeveloper. All rights reserved.
* @license GPLv3 or later
* @since 1.0.0
*/
use EmbedPress\AutoLoader;
defined('ABSPATH') or die("No direct script access allowed.");
$autoLoaderFullClassName = EMBEDPRESS_NAMESPACE . '\\' . EMBEDPRESS_AUTOLOADER_NAME;
if ( ! defined('EMBEDPRESS_IS_LOADED') || ! class_exists($autoLoaderFullClassName)) {
define('EMBEDPRESS_IS_LOADED', true);
if ( ! class_exists($autoLoaderFullClassName)) {
require_once EMBEDPRESS_PATH_CORE . EMBEDPRESS_AUTOLOADER_NAME . '.php';
}
AutoLoader::register(str_replace('\\', "", EMBEDPRESS_NAMESPACE), EMBEDPRESS_PATH_CORE);
// Register the src directory for new structure
AutoLoader::register('EmbedPress\\Src', EMBEDPRESS_PATH_BASE . 'src/');
}
unset($autoLoaderFullClassName);