# wp-optimize/4.7.0/vendor/team-updraft/lib-onboarding-wizard/autoload.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.7.0. 22 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/team-updraft/lib-onboarding-wizard/autoload.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.7.0/raw/vendor/team-updraft/lib-onboarding-wizard/autoload.php
- Modified: 2025-12-12T13:37:28+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-optimize/4.7.0/code/vendor/team-updraft/lib-onboarding-wizard/autoload.php#L10-L20`.

```php
<?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;
	}
});

```
