WP_Upgrader::init()
Initializes the upgrader.
This will set the relationship between the skin being used and this upgrader, and also add the generic strings to WP_Upgrader::$strings.
Additionally, it will schedule a weekly task to clean up the temporary backup directory.
Method of the class: WP_Upgrader{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Upgrader = new WP_Upgrader(); $WP_Upgrader->init();
Changelog
Since 2.8.0 | Introduced. |
Since 6.3.0 | Added the schedule_temp_backup_cleanup() task. |
WP_Upgrader::init() WP Upgrader::init code WP 6.7.1
public function init() { $this->skin->set_upgrader( $this ); $this->generic_strings(); if ( ! wp_installing() ) { $this->schedule_temp_backup_cleanup(); } }