Ticket #26065: 26065.diff
File 26065.diff, 1.0 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/plugin.php
803 803 $errors[] = $plugin_file; 804 804 } 805 805 806 // Remove deleted plugins from the plugin updates list. 807 if ( $current = get_site_transient('update_plugins') ) { 808 $deleted = array_diff( $plugins, $errors ); // Don't remove the plugins that weren't deleted. 809 810 foreach ( $deleted as $plugin_file ) { 811 unset( $current->response[ $plugin_file ] ); 812 } 813 814 set_site_transient( 'update_plugins', $current ); 815 } 816 806 817 if ( ! empty($errors) ) 807 818 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s.'), implode(', ', $errors)) ); 808 819 809 // Force refresh of plugin update information810 if ( $current = get_site_transient('update_plugins') ) {811 unset( $current->response[ $plugin_file ] );812 set_site_transient('update_plugins', $current);813 }814 815 820 return true; 816 821 } 817 822