HEX
Server: Apache
System: Linux plesk02.novi-net.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: leokosak.from.hr_bptbvso25rn (10098)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/leokosak.from.hr/cms.leokosak.from.hr/wp-content/themes/zeever/inc/autoload.php
<?php
/**
 * Autoload function
 *
 * @author Jegstudio
 * @package zeever
 * @since 1.0.0
 */

spl_autoload_register(
	function( $class ) {
		$prefix   = 'Zeever';
		$base_dir = ZEEVER_DIR . 'inc/class/';
		$len      = strlen( $prefix );

		if ( strncmp( $prefix, $class, $len ) !== 0 ) {
			return;
		}

		$array_path     = explode( '\\', substr( $class, $len ) );
		$relative_class = array_pop( $array_path );
		$class_path     = strtolower( implode( '/', $array_path ) );
		$class_name     = str_replace( '_', '-', 'class-' . $relative_class . '.php' );

		$file = rtrim( $base_dir, '/' ) . '/' . $class_path . '/' . strtolower( $class_name );

		if ( is_link( $file ) ) {
			$file = readlink( $file );
		}

		if ( is_file( $file ) ) {
			require $file;
		}
	}
);