CLI_Command::get_update_type_str()privateWP-CLI 1.0

Get a string representing the type of update being checked for.

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

Хуков нет.

Возвращает

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

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

// private - только в коде основоного (родительского) класса
$result = $this->get_update_type_str( $assoc_args );
$assoc_args (обязательный)
-

Код CLI_Command::get_update_type_str() WP-CLI 2.8.0-alpha

private function get_update_type_str( $assoc_args ) {
	$update_type = ' ';
	foreach ( [ 'major', 'minor', 'patch' ] as $type ) {
		if ( true === Utils\get_flag_value( $assoc_args, $type ) ) {
			$update_type = ' ' . $type . ' ';
			break;
		}
	}
	return $update_type;
}