Root::version( array $args, array $assoc_args )
Display the version of LifterLMS or the specified LifterLMS add-on.
Description Description
OPTIONS OPTIONS
[
EXAMPLES EXAMPLES
# Show the LifterLMS core plugin version
wp llms version
# Show the LifterLMS core plugin version
wp llms version core
# Show an add-on version without the "lifterlms-" prefix.
wp llms version groups
# Show an add-on version with the "lifterlms-" prefix.
wp llms version lifterlms-assignments
Parameters Parameters
- $args
-
(array) (Required) Indexed array of positional command arguments.
- $assoc_args
-
(array) (Required) Associative array of command options.
Return Return
(null)
Source Source
File: libraries/lifterlms-cli/src/Commands/Root.php
public function version( $args, $assoc_args ) { $slug = empty( $args[0] ) ? 'core' : $args[0]; if ( in_array( $slug, array( 'core', 'lifterlms' ), true ) ) { return \WP_CLI::log( llms()->version ); } $addon = $this->get_addon( $slug ); if ( empty( $addon ) ) { return \WP_CLI::error( 'Invalid slug.' ); } if ( $addon->is_installed() ) { return \WP_CLI::log( $addon->get_installed_version() ); } return \WP_CLI::error( sprintf( "The requested add-on is not installed. Run 'wp llms addon install %s.' to install it.", $args[0] ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
0.0.2 | Remove --db option. This will be implemented in a separate command. |
0.0.1 | Introduced. |