WP_CLI
Completions::add
Store individual option.
Method of the class: Completions{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->add( $opt );
- $opt(string) (required)
- Option to store.
Completions::add() Completions::add code WP-CLI 2.13.0-alpha
private function add( $opt ) {
if ( '' !== $this->cur_word ) {
if ( 0 !== strpos( $opt, $this->cur_word ) ) {
return;
}
}
$this->opts[] = $opt;
}