| Server IP : 144.76.79.100 / Your IP : 216.73.216.103 [ Web Server : Apache System : Linux ch05.wehostwebserver.com 5.14.0-611.5.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 08:09:09 EST 2025 x86_64 User : razzlestore ( 1092) PHP Version : 8.2.29 Disable Function : NONE Domains : 343 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/razzlestore/public_html/wp-content/plugins/iks-menu/includes/core/ |
Upload File : |
<?php
/**
* IksStudio Core
*
*
* @package IksStudio Core
* @author IksStudio
* @license GPL-3.0
* @link https://iks-studio.com
* @copyright 2019 IksStudio
*/
if ( ! function_exists( 'iks_autoloader' ) ) {
function iks_autoloader( $class, $namespace, $dir ) {
// project-specific namespace prefix
$prefix = $namespace;
$core_prefix = 'IksStudio\IKSM_CORE';
// base directory for the namespace prefix
$base_dir = $dir . '/includes/';
$is_core_file = strncmp( $core_prefix, $class, strlen( $core_prefix ) ) === 0;
$is_local_file = strncmp( $prefix, $class, strlen( $prefix ) ) === 0;
// does the class use the namespace prefix?
if ( ! $is_core_file && ! $is_local_file ) {
// no, move to the next registered autoloader
return;
}
$result_prefix = $is_core_file ? $core_prefix : $prefix;
if ( $is_core_file ) {
$base_dir .= 'core/';
}
// get the relative class name
$relative_class = substr( $class, strlen( $result_prefix ) );
// 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( '\\', '/', $relative_class ) . '.php';
// if the file exists, require it
if ( file_exists( $file ) ) {
require $file;
}
}
}