public function update( $args, $assoc_args ) {
		$all = Utils\get_flag_value( $assoc_args, 'all', false );

		$args = $this->check_optional_args_and_all( $args, $all );
		if ( ! $args ) {
			return;
		}

		if ( isset( $assoc_args['version'] ) ) {
			foreach ( $this->fetcher->get_many( $args ) as $theme ) {
				$r = delete_theme( $theme->stylesheet );
				if ( is_wp_error( $r ) ) {
					WP_CLI::warning( $r );
				} else {
					$assoc_args['force'] = true;
					$this->install( array( $theme->stylesheet ), $assoc_args );
				}
			}
		} else {
			parent::update_many( $args, $assoc_args );
		}
	}
public function update( $args, $assoc_args ) {
		$all = Utils\get_flag_value( $assoc_args, 'all', false );

		$args = $this->check_optional_args_and_all( $args, $all );
		if ( ! $args ) {
			return;
		}

		if ( isset( $assoc_args['version'] ) ) {
			foreach ( $this->fetcher->get_many( $args ) as $theme ) {
				$r = delete_theme( $theme->stylesheet );
				if ( is_wp_error( $r ) ) {
					WP_CLI::warning( $r );
				} else {
					$assoc_args['force'] = true;
					$this->install( array( $theme->stylesheet ), $assoc_args );
				}
			}
		} else {
			parent::update_many( $args, $assoc_args );
		}
	}
public function update ( $ args , $ assoc_args ) { $ all = Utils \ get_flag_value ( $ assoc_args , 'all' , false ) ; $ args = $ this -> check_optional_args_and_all ( $ args , $ all ) ; if ( ! $ args ) { return ; } if ( isset ( $ assoc_args [ 'version' ] ) ) { foreach ( $ this -> fetcher -> get_many ( $ args ) as $ theme ) { $ r = delete_theme ( $ theme -> stylesheet ) ; if ( is_wp_error ( $ r ) ) { WP_CLI :: warning ( $ r ) ; } else { $ assoc_args [ 'force' ] = true ; $ this -> install ( array ( $ theme -> stylesheet ) , $ assoc_args ) ; } } } else { parent :: update_many ( $ args , $ assoc_args ) ; } }
Updates one or more themes.

## OPTIONS

[<theme>...]
: One or more themes to update.

[--all]
: If set, all themes that have updates will be updated.

[--exclude=<theme-names>]
: Comma separated list of theme names that should be excluded from updating.

[--format=<format>]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- summary
---

[--version=<version>]
: If set, the theme will be updated to the specified version.

[--dry-run]
: Preview which themes would be updated.

## EXAMPLES

# Update multiple themes
$ wp theme update twentyfifteen twentysixteen
Downloading update from https://downloads.wordpress.org/theme/twentyfifteen.1.5.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the theme...
Theme updated successfully.
Downloading update from https://downloads.wordpress.org/theme/twentysixteen.1.2.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the theme...
Theme updated successfully.
+---------------+-------------+-------------+---------+
| name          | old_version | new_version | status  |
+---------------+-------------+-------------+---------+
| twentyfifteen | 1.4         | 1.5         | Updated |
| twentysixteen | 1.1         | 1.2         | Updated |
+---------------+-------------+-------------+---------+
Success: Updated 2 of 2 themes.

# Exclude themes updates when bulk updating the themes
$ wp theme update --all --exclude=twentyfifteen
Downloading update from https://downloads.wordpress.org/theme/astra.1.0.5.1.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the theme...
Theme updated successfully.
Downloading update from https://downloads.wordpress.org/theme/twentyseventeen.1.2.zip...
Unpacking the update...
Installing the latest version...
Removing the old version of the theme...
Theme updated successfully.
+-----------------+----------+---------+----------------+
| name            | status   | version | update_version |
+-----------------+----------+---------+----------------+
| astra           | inactive | 1.0.1   | 1.0.5.1        |
| twentyseventeen | inactive | 1.1     | 1.2            |
+-----------------+----------+---------+----------------+
Success: Updated 2 of 2 themes.

# Update all themes
$ wp theme update --all

@alias upgrade
Updates one or more themes .