Tribe__Dependency::is_plugin_version_registered( string $main_class, string $version, string $compare = '>=' )
Is the plugin registered with at least the minimum version
Contents
Parameters
- $main_class
-
(string) (Required) Main/base class for this plugin
- $version
-
(string) (Required) Version to do a compare against
- $compare
-
(string) (Optional) Version compare string, defaults to >=
Default value: '>='
Return
(bool)
Source
File: src/Tribe/Dependency.php
public function is_plugin_version_registered( $main_class, $version, $compare = '>=' ) {
//registered plugin check if addon as it tests if it might load
if ( ! $this->is_plugin_registered( $main_class ) ) {
return false;
} elseif ( version_compare( $this->get_registered_plugin_version( $main_class ), $version, $compare ) ) {
return true;
}
return false;
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |