LLMS_Add_On::is_active()
Determine if an installable addon is active
Return Return
(bool)
Source Source
File: includes/models/model.llms.add-on.php
public function is_active() {
if ( $this->is_installable() && $this->is_installed() ) {
$file = $this->get( 'update_file' );
$type = $this->get_type();
if ( 'plugin' === $type ) {
return is_plugin_active( $file );
} elseif ( 'theme' === $type ) {
$theme = wp_get_theme();
return ( $file === $theme->get_stylesheet() );
}
}
return false;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.22.0 | Introduced. |