WP_CLI
ContextManager::register_context()
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() ContextManager::register context WP-CLI 2.8.0-alpha
public function register_context( $name, Context $implementation ) { $this->contexts[ $name ] = $implementation; }