WP_CLI
prepare_bootstrap()
Register the classes needed for the bootstrap process.
The Composer autoloader is not active yet at this point, so we need to use a custom autoloader to fetch the bootstrap classes in a flexible way.
No Hooks.
Returns
null. Nothing (null).
Usage
prepare_bootstrap();
prepare_bootstrap() prepare bootstrap code WP-CLI 2.13.0-alpha
function prepare_bootstrap() {
require_once WP_CLI_ROOT . '/php/WP_CLI/Autoloader.php';
$autoloader = new Autoloader();
$autoloader->add_namespace(
'WP_CLI\Bootstrap',
WP_CLI_ROOT . '/php/WP_CLI/Bootstrap'
)->register();
}