WP_CLI

Completions::add()privateWP-CLI 1.0

Store individual option.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->add( $opt );
$opt(строка) (обязательный)
Option to store.

Код Completions::add() WP-CLI 2.8.0-alpha

private function add( $opt ) {
	if ( '' !== $this->cur_word ) {
		if ( 0 !== strpos( $opt, $this->cur_word ) ) {
			return;
		}
	}

	$this->opts[] = $opt;
}