WordPress.org

Make WordPress Core

Ticket #16360: 16360.2.diff

File 16360.2.diff, 1.8 KB (added by nacin, 3 years ago)
  • wp-admin/users.php

     
    150150        if ( empty($_REQUEST['users']) ) 
    151151                $userids = array(intval($_REQUEST['user'])); 
    152152        else 
    153                 $userids = $_REQUEST['users']; 
     153                $userids = (array) $_REQUEST['users']; 
    154154 
    155155        include ('admin-header.php'); 
    156156?> 
     
    161161<div class="wrap"> 
    162162<?php screen_icon(); ?> 
    163163<h2><?php _e('Delete Users'); ?></h2> 
    164 <p><?php _e('You have specified these users for deletion:'); ?></p> 
     164<p><?php echo _n( 'You have specified this user for deletion:', 'You have specified these users for deletion:', count( $userids ) ); ?></p> 
    165165<ul> 
    166166<?php 
    167         $go_delete = false; 
    168         foreach ( (array) $userids as $id ) { 
     167        $go_delete = 0; 
     168        foreach ( $userids as $id ) { 
    169169                $id = (int) $id; 
    170170                $user = new WP_User($id); 
    171171                if ( $id == $current_user->ID ) { 
    172172                        echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n"; 
    173173                } else { 
    174174                        echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "</li>\n"; 
    175                         $go_delete = true; 
     175                        $go_delete++; 
    176176                } 
    177177        } 
    178178        ?> 
    179179        </ul> 
    180180<?php if ( $go_delete ) : ?> 
    181         <fieldset><p><legend><?php _e('What should be done with posts and links owned by this user?'); ?></legend></p> 
     181        <fieldset><p><legend><?php echo _n( 'What should be done with posts and links owned by this user?', 'What should be done with posts and links owned by these users?', $go_delete ); ?></legend></p> 
    182182        <ul style="list-style:none;"> 
    183183                <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" checked="checked" /> 
    184184                <?php _e('Delete all posts and links.'); ?></label></li>