WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Самая быстрая Тема-конструктор для WordPress
функция не описана

mmdb_autoload() WC 1.0

Automatically include the file that defines <code>class</code>.

Хуков нет.

Возвращает

Null. Ничего.

Использование

mmdb_autoload( $class );
$class(строка) (обязательный)
the name of the class to load

Код mmdb_autoload() WC 4.6.1

<?php
function mmdb_autoload($class)
{
    /*
    * A project-specific mapping between the namespaces and where
    * they're located. By convention, we include the trailing
    * slashes. The one-element array here simply makes things easy
    * to extend in the future if (for example) the test classes
    * begin to use one another.
    */
    $namespace_map = ['MaxMind\\Db\\' => __DIR__ . '/src/MaxMind/Db/'];

    foreach ($namespace_map as $prefix => $dir) {
        /* First swap out the namespace prefix with a directory... */
        $path = str_replace($prefix, $dir, $class);

        /* replace the namespace separator with a directory separator... */
        $path = str_replace('\\', '/', $path);

        /* and finally, add the PHP file extension to the result. */
        $path = $path . '.php';

        /* $path should now contain the path to a PHP file defining $class */
        if (file_exists($path)) {
            include $path;
        }
    }
}