multilingual-press-advanced-translation.php
/**
 * Autoloads files with classes when needed
 *
 * @since  3.0.0
 * @param  string $class_name Name of the class being requested.
 * @return void
 */
Autoloads files with classes when needed
@since  3.0.0
@param  string $class_name Name of the class being requested.
@return void
Autoloads files with classes when needed @since 3 . 0 . 0 @param string $class_name Name of the class being requested . @return void
function autoload( $class_name ) {
	$prefix = __NAMESPACE__ . '\\';
		$len = strlen( $prefix );
	if ( 0 !== strncmp( $prefix, $class_name, $len ) ) {
		return;
	}
	$relative_class = substr( $class_name, $len );
	$path = strtolower( str_replace( array( '\\', '_' ), array( '/', '-' ), $relative_class ) );
	$file = ZMLPAT_PATH . $path . '.php';
	if ( file_exists( $file ) ) {
		require $file;
	}
}
function autoload ( $ class_name ) { $ prefix = __NAMESPACE__ . '\\' ; $ len = strlen ( $ prefix ) ; if ( 0 !== strncmp ( $ prefix , $ class_name , $ len ) ) { return ; } $ relative_class = substr ( $ class_name , $ len ) ; $ path = strtolower ( str_replace ( array ( '\\' , '_' ) , array ( '/' , '-' ) , $ relative_class ) ) ; $ file = ZMLPAT_PATH . $ path . '.php' ; if ( file_exists ( $ file ) ) { require $ file ; } }
Autoloads files with classes when needed
 @since  3.0.0
 @param  string $class_name Name of the class being requested.
Autoloads files with classes when needed @since 3 . 0 . 0 @param string $class_name Name of the class being requested .
// project-specific namespace prefix // does the class use the namespace prefix?
 // no, move to the next registered autoloader // get the relative class name /*
	 * replace the namespace prefix with the base directory, replace namespace
	 * separators with directory separators in the relative class name, replace
	 * underscores with dashes, and append with .php
	 */ // if the file exists, require it