public function version( $args = [], $assoc_args = [] ) {
		$details = self::get_wp_details();

		if ( ! Utils\get_flag_value( $assoc_args, 'extra' ) ) {
			WP_CLI::line( $details['wp_version'] );
			return;
		}

		$match                   = [];
		$found_version           = preg_match( '/(\d)(\d+)-/', $details['tinymce_version'], $match );
		$human_readable_tiny_mce = $found_version ? "{$match[1]}.{$match[2]}" : '';

		echo Utils\mustache_render(
			self::get_template_path( 'versions.mustache' ),
			[
				'wp-version'    => $details['wp_version'],
				'db-version'    => $details['wp_db_version'],
				'local-package' => empty( $details['wp_local_package'] )
					? 'en_US'
					: $details['wp_local_package'],
				'mce-version'   => $human_readable_tiny_mce
					? "{$human_readable_tiny_mce} ({$details['tinymce_version']})"
					: $details['tinymce_version'],
			]
		);
	}
public function version( $args = [], $assoc_args = [] ) {
		$details = self::get_wp_details();

		if ( ! Utils\get_flag_value( $assoc_args, 'extra' ) ) {
			WP_CLI::line( $details['wp_version'] );
			return;
		}

		$match                   = [];
		$found_version           = preg_match( '/(\d)(\d+)-/', $details['tinymce_version'], $match );
		$human_readable_tiny_mce = $found_version ? "{$match[1]}.{$match[2]}" : '';

		echo Utils\mustache_render(
			self::get_template_path( 'versions.mustache' ),
			[
				'wp-version'    => $details['wp_version'],
				'db-version'    => $details['wp_db_version'],
				'local-package' => empty( $details['wp_local_package'] )
					? 'en_US'
					: $details['wp_local_package'],
				'mce-version'   => $human_readable_tiny_mce
					? "{$human_readable_tiny_mce} ({$details['tinymce_version']})"
					: $details['tinymce_version'],
			]
		);
	}
public function version ( $ args = [ ] , $ assoc_args = [ ] ) { $ details = self :: get_wp_details ( ) ; if ( ! Utils \ get_flag_value ( $ assoc_args , 'extra' ) ) { WP_CLI :: line ( $ details [ 'wp_version' ] ) ; return ; } $ match = [ ] ; $ found_version = preg_match ( '/(\d)(\d+)-/' , $ details [ 'tinymce_version' ] , $ match ) ; $ human_readable_tiny_mce = $ found_version ? "{$match[1]}.{$match[2]}" : '' ; echo Utils \ mustache_render ( self :: get_template_path ( 'versions.mustache' ) , [ 'wp-version' => $ details [ 'wp_version' ] , 'db-version' => $ details [ 'wp_db_version' ] , 'local-package' => empty ( $ details [ 'wp_local_package' ] ) ? 'en_US' : $ details [ 'wp_local_package' ] , 'mce-version' => $ human_readable_tiny_mce ? "{$human_readable_tiny_mce} ({$details['tinymce_version']})" : $ details [ 'tinymce_version' ] , ] ) ; }
Displays the WordPress version.

## OPTIONS

[--extra]
: Show extended version information.

## EXAMPLES

# Display the WordPress version
$ wp core version
4.5.2

# Display WordPress version along with other information
$ wp core version --extra
WordPress version: 4.5.2
Database revision: 36686
TinyMCE version:   4.310 (4310-20160418)
Package language:  en_US

@when before_wp_load
Displays the WordPress version .