WP_CLI

bootstrap()WP-CLI 1.0

Process the bootstrapping steps.

Loops over each of the provided steps, instantiates it and then calls its process() method.

No Hooks.

Returns

null. Nothing (null).

Usage

bootstrap();

bootstrap() code WP-CLI 2.13.0-alpha

function bootstrap() {
	prepare_bootstrap();
	$state = initialize_bootstrap_state();

	foreach ( get_bootstrap_steps() as $step ) {
		/** @var BootstrapStep $step_instance */
		if ( class_exists( 'WP_CLI' ) ) {
			\WP_CLI::debug( "Processing bootstrap step: {$step}", 'bootstrap' );
		}

		$step_instance = new $step();
		$state         = $step_instance->process( $state );
	}
}