WordPress.org

Make WordPress Core

Changeset 34591


Ignore:
Timestamp:
09/26/2015 01:10:05 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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

Fixes #33239.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/plugins.php

    r34551 r34591  
    369369                require_once(ABSPATH . 'wp-admin/admin-footer.php');
    370370                exit;
    371             } //Endif verify-delete
    372             $delete_result = delete_plugins($plugins);
     371            } else {
     372                $plugins_to_delete = count( $plugins );
     373            } // endif verify-delete
     374
     375            $delete_result = delete_plugins( $plugins );
    373376
    374377            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
    375             wp_redirect( self_admin_url("plugins.php?deleted=true&plugin_status=$status&paged=$page&s=$s") );
     378            wp_redirect( self_admin_url("plugins.php?deleted=$plugins_to_delete&plugin_status=$status&paged=$page&s=$s") );
    376379            exit;
    377380
     
    471474            <p>
    472475                <?php
    473                 if ( 1 == $plugins_to_delete ) {
     476                if ( 1 == (int) $_GET['deleted'] ) {
    474477                    _e( 'The selected plugin has been <strong>deleted</strong>.' );
    475478                } else {
Note: See TracChangeset for help on using the changeset viewer.