WPDev.one
Core Class

WP_Upgrader

class WP_Upgrader // Constructor: function Object() { [native code] }

Core class used for upgrading/installing a local set of files via

Methods 17 methods

Method / Return Description
__construct()
void

Construct the upgrader with a skin.

Parameters: $skin: mixed
init()
void

Initializes the upgrader.

schedule_temp_backup_cleanup()
void

Schedules the cleanup of the temporary backup directory.

generic_strings()
void

Adds the generic strings to WP_Upgrader::$strings.

fs_connect()
(bool

Connects to the filesystem.

Parameters: $directories: mixed, $allow_relaxed_file_ownership: mixed
download_package()
(string

Downloads a package.

Parameters: $package: mixed, $check_signatures: mixed, $hook_extra: mixed
unpack_package()
(string

Unpacks a compressed package file.

Parameters: $package: mixed, $delete_package: mixed
flatten_dirlist()
array

Flattens the results of WP_Filesystem_Base::dirlist() for iterating over.

Parameters: $nested_files: mixed, $path: mixed
clear_destination()
(true

Clears the directory where this item is going to be installed into.

Parameters: $remote_destination: mixed
install_package()
(array

Install a package.

Parameters: $args: mixed
run()
(array

Runs an upgrade/installation.

Parameters: $options: mixed
maintenance_mode()
void

Toggles maintenance mode for the site.

Parameters: $enable: mixed
create_lock()
bool

Creates a lock using WordPress options.

Parameters: $lock_name: mixed, $release_timeout: mixed
release_lock()
bool

Releases an upgrader lock.

Parameters: $lock_name: mixed
move_to_temp_backup_dir()
(bool

Moves the plugin or theme being updated into a temporary backup directory.

Parameters: $args: mixed
restore_temp_backup()
(bool

Restores the plugin or theme from temporary backup.

Parameters: $temp_backups: array
delete_temp_backup()
(bool

Deletes a temporary backup.

Parameters: $temp_backups: array

Properties

Property / Type Description
$strings
mixed
public
No description available.
$skin
mixed
public
No description available.
$result
mixed
public
No description available.
$update_count
mixed
public
No description available.
$update_current
mixed
public
No description available.
$temp_backups
mixed
public
No description available.
$temp_restores
mixed
public
No description available.

Class Information

Since Version
2.8.0
Source File
wp-admin/includes/class-wp-upgrader.php
Advertisement