WP_CLI

ContextManager::register_context()publicWP-CLI 1.0

Register a context with WP-CLI.

Метод класса: ContextManager{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$ContextManager = new ContextManager();
$ContextManager->register_context( $name, $implementation );
$name(строка) (обязательный)
Name of the context.
$implementation(Context) (обязательный)
Implementation of the context.

Код ContextManager::register_context() WP-CLI 2.8.0-alpha

public function register_context( $name, Context $implementation ) {
	$this->contexts[ $name ] = $implementation;
}