ActionScheduler_Versions
Located in classes/ActionScheduler_Versions.php.
Tracks registered versions of Action Scheduler and their initialization callbacks, and exposes information about the active source.
Public Methods
register( $version_string, $initialization_callback )
Register a version and its initialization callback.
- Parameters:
$version_string(string)$initialization_callback(callable)
- Returns:
boolfalseif that version is already registered.
Notes:
- Records the file path for the caller via
debug_backtrace()to track sources.
get_versions()
Return all registered versions.
- Returns:
array<string, callable>
get_sources()
Return the set of registered sources mapped to version strings.
- Returns:
array<string, string> - Since: 3.9.1
latest_version()
Return the latest registered version string.
- Returns:
string|false
latest_version_callback()
Return the initialization callback for the latest registered version.
- Returns:
callable|string('__return_null'if no versions are registered)
instance()
Return the singleton instance.
- Returns:
ActionScheduler_Versions
initialize_latest_version()
Initialize the latest registered version by calling its callback.
- Returns:
void
active_source()
Return information about the plugin or theme that contains the active Action Scheduler version.
- Returns:
array - Deprecated: 3.9.2 (use
ActionScheduler_SystemInformation::active_source())
active_source_path()
Return the directory path for the active Action Scheduler source.
- Returns:
string - Deprecated: 3.9.2 (use
ActionScheduler_SystemInformation::active_source_path())