Puvox – Blog

Available functions, class during SHORTINIT (WP)

There is almost no documentation about WordPress SHORTINIT constant. It is mainly used when people need to load wp-core minimally (SHORTINIT is being checked in wp-settings.php) as opposed to complete WP Load without it.

We made a dump of complete (for now) list of dump of available functions, classes and constants, when using SHORTINIT:

RESULTS –>https://pastebin.com/3cfmH1C0

___
Btw, test was made using: 

function get_all() {
    return [
        'get_declared_classes'   => get_declared_classes(),
        'get_declared_interfaces'=> get_declared_interfaces(),
        'get_declared_traits'    => get_declared_traits(),
        'get_defined_constants'  => get_defined_constants(),
        'get_defined_functions'  => get_defined_functions(),
        'get_defined_vars'       => get_defined_vars(),
        'get_included_files'     => get_included_files()
    ];
}

$initial_array = get_all();
define('SHORTINIT', true);
require_once( __DIR__ . '/wp-load.php' );
$current_array = get_all();

and WinMerge to compare the results.

RESULTS for initial call (before WP load) –> https://pastebin.com/39A1eQzv

Exit mobile version