Plugin_Upgrader_Trait
trait Plugin_Upgrader_Trait
A trait to extend the Plugin functionality by providing methods for running tasks on version updates.
Properties
| static protected string | $upgrades_dir |
Methods
Check if the Upgraders need to be run, then run them and update the current version if so.
Check if the Plugin version is newer than the currently stored version.
Find all upgrade Schemas and run them.
Update the current Plugin version in the database.
Sort Schema actions by version.
Loop through and execute all Schema actions.
Details
at line 34
final
init_upgrader()
Check if the Upgraders need to be run, then run them and update the current version if so.
at line 46
final bool
requires_version_upgrade()
Check if the Plugin version is newer than the currently stored version.
at line 63
final
run_upgrades()
Find all upgrade Schemas and run them.
at line 103
final
update_current_version()
Update the current Plugin version in the database.
at line 115
final static array
sort_upgrade_schemas(array $upgrade_schemas)
Sort Schema actions by version.
at line 142
final static
execute_schemas(string $current_version, array $upgrade_schemas)
Loop through and execute all Schema actions.