[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Upgrade API: Plugin_Upgrader class
File Size: | 710 lines (23 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
Plugin_Upgrader:: (11 methods):
upgrade_strings()
install_strings()
install()
upgrade()
bulk_upgrade()
check_package()
plugin_info()
deactivate_plugin_before_upgrade()
active_before()
active_after()
delete_old_plugin()
Class: Plugin_Upgrader - X-Ref
Core class used for upgrading/installing plugins.upgrade_strings() X-Ref |
Initializes the upgrade strings. |
install_strings() X-Ref |
Initializes the installation strings. |
install( $package, $args = array() X-Ref |
Install a plugin package. return: bool|WP_Error True if the installation was successful, false or a WP_Error otherwise. param: string $package The full local path or URI of the package. param: array $args { |
upgrade( $plugin, $args = array() X-Ref |
Upgrades a plugin. return: bool|WP_Error True if the upgrade was successful, false or a WP_Error object otherwise. param: string $plugin Path to the plugin file relative to the plugins directory. param: array $args { |
bulk_upgrade( $plugins, $args = array() X-Ref |
Upgrades several plugins at once. return: array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem. param: string[] $plugins Array of paths to plugin files relative to the plugins directory. param: array $args { |
check_package( $source ) X-Ref |
Checks that the source package contains a valid plugin. Hooked to the {@see 'upgrader_source_selection'} filter by Plugin_Upgrader::install(). return: string|WP_Error The source as passed, or a WP_Error object on failure. param: string $source The path to the downloaded package source. |
plugin_info() X-Ref |
Retrieves 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( $response, $plugin ) X-Ref |
Deactivates a plugin before it is upgraded. Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade(). return: bool|WP_Error The original `$response` parameter or WP_Error. param: bool|WP_Error $response The installation response before the installation has started. param: array $plugin Plugin package arguments. |
active_before( $response, $plugin ) X-Ref |
Turns on maintenance mode before attempting to background update an active plugin. Hooked to the {@see 'upgrader_pre_install'} filter by Plugin_Upgrader::upgrade(). return: bool|WP_Error The original `$response` parameter or WP_Error. param: bool|WP_Error $response The installation response before the installation has started. param: array $plugin Plugin package arguments. |
active_after( $response, $plugin ) X-Ref |
Turns off maintenance mode after upgrading an active plugin. Hooked to the {@see 'upgrader_post_install'} filter by Plugin_Upgrader::upgrade(). return: bool|WP_Error The original `$response` parameter or WP_Error. param: bool|WP_Error $response The installation response after the installation has finished. param: array $plugin Plugin package arguments. |
delete_old_plugin( $removed, $local_destination, $remote_destination, $plugin ) X-Ref |
Deletes the old plugin during an upgrade. Hooked to the {@see 'upgrader_clear_destination'} filter by Plugin_Upgrader::upgrade() and Plugin_Upgrader::bulk_upgrade(). return: bool|WP_Error param: bool|WP_Error $removed Whether the destination was cleared. param: string $local_destination The local package destination. param: string $remote_destination The remote package destination. param: array $plugin Extra arguments passed to hooked filters. |
Generated : Sat Nov 23 08:20:01 2024 | Cross-referenced by PHPXref |