LLMS_Add_On::is_installed()

Determine if the add-on is currently installed


Description Description


Return Return

(bool)


Top ↑

Source Source

File: includes/models/model.llms.add-on.php

	public function is_installed() {

		if ( ! $this->is_installable() ) {
			return false;
		}

		$type = $this->get_type();

		if ( 'plugin' === $type ) {
			return in_array( $this->get( 'update_file' ), array_keys( get_plugins() ) );
		} elseif ( 'theme' === $type ) {
			return wp_get_theme( $this->get( 'update_file' ) )->exists();
		}

		return false;

	}

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.