WP_Upgrader::init()publicWP 2.8.0

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.

Метод класса: WP_Upgrader{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Upgrader = new WP_Upgrader();
$WP_Upgrader->init();

Список изменений

С версии 2.8.0 Введена.
С версии 6.3.0 Added the schedule_temp_backup_cleanup() task.

Код WP_Upgrader::init() WP 6.5.2

public function init() {
	$this->skin->set_upgrader( $this );
	$this->generic_strings();

	if ( ! wp_installing() ) {
		$this->schedule_temp_backup_cleanup();
	}
}