[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)




/wp-admin/includes/ -> class-plugin-upgrader.php (summary)

Upgrade API: Plugin_Upgrader class

File Size: 487 lines (15 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Plugin_Upgrader:: (9 methods):

Class: Plugin_Upgrader  - X-Ref

Core class used for upgrading/installing plugins.

It is designed to upgrade/install plugins from a local zip, remote zip URL,
or uploaded zip file.

upgrade_strings()   X-Ref
Initialize the upgrade strings.

install_strings()   X-Ref
Initialize the installation strings.

install( $package, $args = array()   X-Ref
Install a plugin package.

param: string $package The full local path or URI of the package.
param: array  $args {
return: bool|WP_Error True if the installation was successful, false or a WP_Error otherwise.

upgrade( $plugin, $args = array()   X-Ref
Upgrade a plugin.

param: string $plugin Path to the plugin file relative to the plugins directory.
param: array  $args {
return: bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise.

bulk_upgrade( $plugins, $args = array()   X-Ref
Bulk upgrade several plugins at once.

param: string[] $plugins Array of paths to plugin files relative to the plugins directory.
param: array    $args {
return: array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.

check_package( $source )   X-Ref
Check a source package to be sure it contains a plugin.

This function is added to the {@see 'upgrader_source_selection'} filter by

param: string $source The path to the downloaded package source.
return: string|WP_Error The source as passed, or a WP_Error object

plugin_info()   X-Ref
Retrieve the path to the file that contains the plugin info.

This isn't used internally in the class, but is called by the skins.

return: string|false The full path to the main plugin file, or false.

deactivate_plugin_before_upgrade( $return, $plugin )   X-Ref
Deactivates a plugin before it is upgraded.

Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade().

param: bool|WP_Error  $return Upgrade offer return.
param: array          $plugin Plugin package arguments.
return: bool|WP_Error The passed in $return param or WP_Error.

delete_old_plugin( $removed, $local_destination, $remote_destination, $plugin )   X-Ref
Delete the old plugin during an upgrade.

Hooked to the {@see 'upgrader_clear_destination'} filter by
Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade().

param: bool|WP_Error $removed
param: string        $local_destination
param: string        $remote_destination
param: array         $plugin
return: bool|WP_Error

Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7