HEX
Server: Apache
System: Linux s1 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: gerold (1018)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals
Upload Files
File: /home/gerold/public_html/wp-content/plugins/snapshot-backups/lib/loader.php
<?php // phpcs:ignore
/**
 * Snapshot autoloader
 *
 * @package snapshot
 */

/**
 * Class name to file mapping procedure
 *
 * @param string $class_name Class name.
 */
function snapshot_resolve_class( $class_name ) {
	$matches = array();

	if ( ! preg_match( '/^WPMUDEV\\\\Snapshot4\\\\(.+)$/', $class_name, $matches ) ) {
		return false;
	}

	$class_name = $matches[1];
	$raw        = explode( '\\', strtolower( $class_name ) );

	if ( false !== strpos( $class_name, 'Traits' ) ) {
		$file = 'trait-' . array_pop( $raw ) . '.php';
	} elseif ( false !== strpos( $class_name, '_' ) ) {
			$file = 'class-' . str_replace( '_', '-', array_pop( $raw ) ) . '.php';
	} else {
		$file = 'class-' . array_pop( $raw ) . '.php';
	}

	$path = __DIR__ . '/snapshot/' . join( DIRECTORY_SEPARATOR, $raw ) . "/{$file}";

	if ( is_readable( $path ) ) {
		require_once $path;
	}
}

spl_autoload_register( 'snapshot_resolve_class' );