LLMS_Add_On::get_installed_version()

Get the currently installed version of an addon


Description Description


Return Return

(string)


Top ↑

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 '';
	}

Top ↑

Changelog Changelog

Changelog
Version Description
3.22.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.