public function path( $args, $assoc_args ) {
		if ( empty( $args ) ) {
			$path = WP_CONTENT_DIR . '/themes';
		} else {
			$theme = $this->fetcher->get_check( $args[0] );

			$path = $theme->get_stylesheet_directory();

			if ( ! Utils\get_flag_value( $assoc_args, 'dir' ) ) {
				$path .= '/style.css';
			}
		}

		WP_CLI::line( $path );
	}
public function path( $args, $assoc_args ) {
		if ( empty( $args ) ) {
			$path = WP_CONTENT_DIR . '/themes';
		} else {
			$theme = $this->fetcher->get_check( $args[0] );

			$path = $theme->get_stylesheet_directory();

			if ( ! Utils\get_flag_value( $assoc_args, 'dir' ) ) {
				$path .= '/style.css';
			}
		}

		WP_CLI::line( $path );
	}
public function path ( $ args , $ assoc_args ) { if ( empty ( $ args ) ) { $ path = WP_CONTENT_DIR . '/themes' ; } else { $ theme = $ this -> fetcher -> get_check ( $ args [ 0 ] ) ; $ path = $ theme -> get_stylesheet_directory ( ) ; if ( ! Utils \ get_flag_value ( $ assoc_args , 'dir' ) ) { $ path .= '/style.css' ; } } WP_CLI :: line ( $ path ) ; }
Gets the path to a theme or to the theme directory.

## OPTIONS

[<theme>]
: The theme to get the path to. Path includes "style.css" file.
If not set, will return the path to the themes directory.

[--dir]
: If set, get the path to the closest parent directory, instead of the
theme's "style.css" file.

## EXAMPLES

# Get theme path
$ wp theme path
/var/www/example.com/public_html/wp-content/themes

# Change directory to theme path
$ cd $(wp theme path)
Gets the path to a theme or to the theme directory .