Warning: This function has been deprecated. Use Plugin_Upgrader() instead.
wp_update_plugin() WordPress Function
The wp_update_plugin() function updates a plugin to the latest version.
wp_update_plugin( $plugin, $feedback = '' ) #
This was once used to kick-off the Plugin Updater.
Description
Deprecated in favor of instantating a Plugin_Upgrader instance directly, and calling the ‘upgrade’ method. Unused since 2.8.0.
See also
Source
File: wp-admin/includes/deprecated.php
function wp_update_plugin($plugin, $feedback = '') { _deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' ); if ( !empty($feedback) ) add_filter('update_feedback', $feedback); require ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; $upgrader = new Plugin_Upgrader(); return $upgrader->upgrade($plugin); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.7.0 | Use Plugin_Upgrader |
2.5.0 | Introduced. |