WP_CLI
Runner::is_command_disabled
Check whether a given command is disabled by the config.
Method of the class: Runner{}
No Hooks.
Returns
true|false.
Usage
$Runner = new Runner(); $Runner->is_command_disabled( $command );
- $command(required)
- .
Runner::is_command_disabled() Runner::is command disabled code WP-CLI 2.13.0-alpha
public function is_command_disabled( $command ) {
$path = implode( ' ', array_slice( Dispatcher\get_path( $command ), 1 ) );
return in_array( $path, $this->config['disabled_commands'], true );
}