LLMS_Add_On::get_installed_version()
Get the currently installed version of an addon
Return Return
(string)
Source Source
File: includes/models/model.llms.add-on.php
public function get_installed_version() {
if ( $this->is_installable() && $this->is_installed() ) {
$type = $this->get( 'type' );
if ( 'plugin' === $type ) {
$data = get_plugin_data( trailingslashit( WP_PLUGIN_DIR ) . $this->get( 'update_file' ) );
return $data['Version'];
} elseif ( 'theme' === $type ) {
$data = wp_get_theme( $this->get( 'update_file' ) );
return $data->get( 'Version' );
}
}
return '';
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.22.0 | Introduced. |