tribe_plugin_version_history( string $class )
Gets the plugin version history for a given main class.
Contents
Important to note we cannot setup instances to get these values, we need to use static mapping here, since generating a full instance will effectively activate parts of the plugin behind the scenes.
Parameters
- $class
-
(string) (Required) Which plugin main class we are looking for.
Return
(array|false)
Source
File: src/functions/utils.php
function tribe_plugin_version_history( $class ) {
if ( ! is_string( $class ) ) {
$class = get_class( $class );
if ( false === $class ) {
return false;
}
}
$map = [
'Tribe__Events__Main' => 'previous_ecp_versions',
'Tribe__Tickets__Main' => 'previous_event_tickets_versions',
'tickets.main' => 'previous_event_tickets_versions',
'Tribe__Tickets_Plus__Main' => 'previous_event_tickets_plus_versions',
'tickets-plus.main' => 'previous_event_tickets_plus_versions',
];
if ( ! isset( $map[ $class ] ) ) {
return false;
}
return (array) Tribe__Settings_Manager::get_option( $map[ $class ] );
}
Changelog
| Version | Description |
|---|---|
| 4.12.14 | Introduced. |