public function delete( $args, $assoc_args ) {

		$all = Utils\get_flag_value( $assoc_args, 'all', false );

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

		$force = Utils\get_flag_value( $assoc_args, 'force', false );

		$successes = 0;
		$errors    = 0;
		foreach ( $this->fetcher->get_many( $args ) as $theme ) {
			$theme_slug = $theme->get_stylesheet();

			if ( $this->is_active_theme( $theme ) && ! $force ) {
				WP_CLI::warning( "Can't delete the currently active theme: $theme_slug" );
				$errors++;
				continue;
			}

			$r = delete_theme( $theme_slug );

			if ( is_wp_error( $r ) ) {
				WP_CLI::warning( $r );
				$errors++;
			} else {
				WP_CLI::log( "Deleted '$theme_slug' theme." );
				$successes++;
			}
		}
		if ( ! $this->chained_command ) {
			Utils\report_batch_operation_results( 'theme', 'delete', count( $args ), $successes, $errors );
		}
	}
public function delete( $args, $assoc_args ) {

		$all = Utils\get_flag_value( $assoc_args, 'all', false );

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

		$force = Utils\get_flag_value( $assoc_args, 'force', false );

		$successes = 0;
		$errors    = 0;
		foreach ( $this->fetcher->get_many( $args ) as $theme ) {
			$theme_slug = $theme->get_stylesheet();

			if ( $this->is_active_theme( $theme ) && ! $force ) {
				WP_CLI::warning( "Can't delete the currently active theme: $theme_slug" );
				$errors++;
				continue;
			}

			$r = delete_theme( $theme_slug );

			if ( is_wp_error( $r ) ) {
				WP_CLI::warning( $r );
				$errors++;
			} else {
				WP_CLI::log( "Deleted '$theme_slug' theme." );
				$successes++;
			}
		}
		if ( ! $this->chained_command ) {
			Utils\report_batch_operation_results( 'theme', 'delete', count( $args ), $successes, $errors );
		}
	}
public function delete ( $ args , $ assoc_args ) { $ all = Utils \ get_flag_value ( $ assoc_args , 'all' , false ) ; $ args = $ this -> check_optional_args_and_all ( $ args , $ all , 'delete' ) ; if ( ! $ args ) { return ; } $ force = Utils \ get_flag_value ( $ assoc_args , 'force' , false ) ; $ successes = 0 ; $ errors = 0 ; foreach ( $ this -> fetcher -> get_many ( $ args ) as $ theme ) { $ theme_slug = $ theme -> get_stylesheet ( ) ; if ( $ this -> is_active_theme ( $ theme ) && ! $ force ) { WP_CLI :: warning ( "Can't delete the currently active theme: $theme_slug" ) ; $ errors ++ ; continue ; } $ r = delete_theme ( $ theme_slug ) ; if ( is_wp_error ( $ r ) ) { WP_CLI :: warning ( $ r ) ; $ errors ++ ; } else { WP_CLI :: log ( "Deleted '$theme_slug' theme." ) ; $ successes ++ ; } } if ( ! $ this -> chained_command ) { Utils \ report_batch_operation_results ( 'theme' , 'delete' , count ( $ args ) , $ successes , $ errors ) ; } }
Deletes one or more themes.

Removes the theme or themes from the filesystem.

## OPTIONS

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

[--all]
: If set, all themes will be deleted except active theme.

[--force]
: To delete active theme use this.

## EXAMPLES

$ wp theme delete twentytwelve
Deleted 'twentytwelve' theme.
Success: Deleted 1 of 1 themes.

@alias uninstall
Deletes one or more themes .