\ActionScheduler_Versions

Class ActionScheduler_Versions

Summary

Methods
Properties
Constants
register()
get_versions()
get_sources()
latest_version()
latest_version_callback()
instance()
initialize_latest_version()
active_source()
active_source_path()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$instance
$versions
$sources
N/A

Properties

$instance

$instance : \ActionScheduler_Versions

ActionScheduler_Versions instance.

Type

normal

$versions

$versions : array<string,callable>

Versions.

Type

normal

$sources

$sources : array<string,string>

Registered sources.

Type

normal

Methods

register()

register(string  $version_string, callable  $initialization_callback) : mixed

Register version's callback.

Parameters

string $version_string

Action Scheduler version.

callable $initialization_callback

Callback to initialize the version.

Returns

mixed

get_versions()

get_versions() : mixed

Get all versions.

Returns

mixed

get_sources()

get_sources() : array<string,string>

Get registered sources.

Use with caution: this method is only available as of Action Scheduler's 3.9.1 release and, owing to the way Action Scheduler is loaded, it's possible that the class definition used at runtime will belong to an earlier version.

Returns

array

latest_version()

latest_version() : mixed

Get latest version registered.

Returns

mixed

latest_version_callback()

latest_version_callback() : mixed

Get callback for latest registered version.

Returns

mixed

instance()

instance() : \ActionScheduler_Versions

Get instance.

Returns

\ActionScheduler_Versions

initialize_latest_version()

initialize_latest_version() : mixed

Initialize.

Returns

mixed

active_source()

active_source() : array

Returns information about the plugin or theme which contains the current active version of Action Scheduler.

If this cannot be determined, or if Action Scheduler is being loaded via some other method, then it will return an empty array. Otherwise, if populated, the array will look like the following:

[
    'type' => 'plugin', # or 'theme'
    'name' => 'Name',
]

Returns

array

active_source_path()

active_source_path() : string

Returns the directory path for the currently active installation of Action Scheduler.

Returns

string