__autoload( string $classname )

Autoloader compatibility callback.


Description Description


Parameters Parameters

$classname

(string) (Required) Class to attempt autoloading.


Top ↑

Source Source

File: wp-includes/spl-autoload-compat.php

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
function __autoload( $classname ) {
    global $_wp_spl_autoloaders;
    foreach ( $_wp_spl_autoloaders as $autoloader ) {
        if ( ! is_callable( $autoloader ) ) {
            // Avoid the extra warning if the autoloader isn't callable.
            continue;
        }
 
        call_user_func( $autoloader, $classname );
 
        // If it has been autoloaded, stop processing.
        if ( class_exists( $classname, false ) ) {
            return;
        }
    }
}

Top ↑

Changelog Changelog

Changelog
Version Description
4.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.