Network Admin: Properly pass the number of delete plugins to the corresponding message.

Fixes #33239.
Built from https://develop.svn.wordpress.org/trunk@34591


git-svn-id: http://core.svn.wordpress.org/trunk@34555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2015-09-26 13:11:25 +00:00
parent efad273513
commit b28dd45f3d
2 changed files with 8 additions and 5 deletions

View File

@ -368,11 +368,14 @@ if ( $action ) {
<?php
require_once(ABSPATH . 'wp-admin/admin-footer.php');
exit;
} //Endif verify-delete
} else {
$plugins_to_delete = count( $plugins );
} // endif verify-delete
$delete_result = delete_plugins( $plugins );
set_transient('plugins_delete_result_' . $user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length
wp_redirect( self_admin_url("plugins.php?deleted=true&plugin_status=$status&paged=$page&s=$s") );
wp_redirect( self_admin_url("plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s") );
exit;
case 'clear-recent-list':
@ -470,7 +473,7 @@ if ( ! empty( $invalid ) ) {
<div id="message" class="updated notice is-dismissible">
<p>
<?php
if ( 1 == $plugins_to_delete ) {
if ( 1 == (int) $_GET['deleted'] ) {
_e( 'The selected plugin has been <strong>deleted</strong>.' );
} else {
_e( 'The selected plugins have been <strong>deleted</strong>.' );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34590';
$wp_version = '4.4-alpha-34591';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.