WP_CLI

prepare_bootstrap()WP-CLI 1.0

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.

Return

null. Nothing (null).

Usage

prepare_bootstrap();

prepare_bootstrap() code WP-CLI 2.8.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();
}