File "autoload.php"

Full Path: /var/www/html/wordpress/wp-content/plugins/wp-optimize/vendor/team-updraft/lib-onboarding-wizard/autoload.php
File size: 524 bytes
MIME-type: text/x-php
Charset: utf-8

 
Open Back
<?php

spl_autoload_register(function ($class) {

	$prefix = 'Updraftplus\Wp_Optimize\\';
	
	// Only handle classes with namespace starting with prefix.
	if (strpos($class, $prefix) !== 0) {
		return;
	}
	
	// Remove the namespace prefix
	$relative_class = substr($class, strlen($prefix));
	$relative_path = str_replace('\\', DIRECTORY_SEPARATOR, $relative_class) . '.php';
	$file = __DIR__ . DIRECTORY_SEPARATOR . $relative_path;
	
	// Require the file if it exists.
	if (file_exists($file)) {
		require_once $file;
	}
});