WP_CLI\Bootstrap
RegisterDeferredCommands::process
Process this single bootstrapping step.
Метод класса: RegisterDeferredCommands{}
Хуков нет.
Возвращает
BootstrapState. Modified state to pass to the next step.
Использование
$RegisterDeferredCommands = new RegisterDeferredCommands(); $RegisterDeferredCommands->process( $state );
- $state(BootstrapState) (обязательный)
- Contextual state to pass into the step.
Код RegisterDeferredCommands::process() RegisterDeferredCommands::process WP-CLI 2.13.0-alpha
public function process( BootstrapState $state ) {
// Process deferred command additions for external packages.
$this->add_deferred_commands();
// Process deferred command additions for commands added through
// plugins.
WP_CLI::add_hook(
'before_run_command',
[ $this, 'add_deferred_commands' ]
);
return $state;
}