WordPress.org

Make WordPress Core

Changeset 11779


Ignore:
Timestamp:
08/06/09 00:40:39 (6 years ago)
Author:
azaozz
Message:

Notice fixes, props mrmist, see #4529

Location:
trunk/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-comments.php

    r11778 r11779  
    133133        } 
    134134        if ( $untrashed > 0 ) { 
    135             printf( _n( '%s comment removed from the trash', '%s comments removed from the trash', $untrashed ), $untrashed ); 
     135            printf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed ); 
    136136            echo '<br />'; 
    137137        } 
  • trunk/wp-admin/edit-pages.php

    r11763 r11779  
    169169} 
    170170if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { 
    171     printf( _n( 'Page removed from the trash.', '%s pages removed from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); 
     171    printf( _n( 'Page restored from the trash.', '%s pages restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); 
    172172    unset($_GET['untrashed']); 
    173173} 
     
    240240)); 
    241241 
     242$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; 
     243 
    242244if ( $page_links ) : ?> 
    243245<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s', 
     
    252254<select name="action"> 
    253255<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    254 <?php if ($_GET['post_status'] == 'trash') { ?> 
     256<?php if ( $is_trash ) { ?> 
    255257<option value="untrash"><?php _e('Restore'); ?></option> 
    256258<option value="delete"><?php _e('Delete Permanently'); ?></option> 
     
    262264<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction" id="doaction" class="button-secondary action" /> 
    263265<?php wp_nonce_field('bulk-pages'); ?> 
    264 <?php if ($_GET['post_status'] == 'trash') { ?> 
     266<?php if ( $is_trash ) { ?> 
    265267<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    266268<?php } ?> 
     
    299301<select name="action2"> 
    300302<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    301 <?php if ($_GET['post_status'] == 'trash') { ?> 
     303<?php if ( $is_trash ) { ?> 
    302304<option value="untrash"><?php _e('Restore'); ?></option> 
    303305<option value="delete"><?php _e('Delete Permanently'); ?></option> 
     
    308310</select> 
    309311<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
    310 <?php if ($_GET['post_status'] == 'trash') { ?> 
     312<?php if ( $is_trash ) { ?> 
    311313<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    312314<?php } ?> 
  • trunk/wp-admin/edit.php

    r11778 r11779  
    2525    check_admin_referer('bulk-posts'); 
    2626     
    27     if (isset($_GET['delete_all']) || isset($_GET['delete_all2'])) { 
     27    if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { 
    2828        $post_status = $wpdb->escape($_GET['post_status']); 
    2929        $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = '$post_status'" ); 
     
    167167if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { 
    168168    printf( _n( 'Post moved to the trash.', '%s posts moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) ); 
    169     unset($_GET['deleted']); 
     169    unset($_GET['trashed']); 
    170170} 
    171171 
    172172if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { 
    173     printf( _n( 'Post removed from the trash.', '%s posts removed from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); 
     173    printf( _n( 'Post restored from the trash.', '%s posts restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); 
    174174    unset($_GET['undeleted']); 
    175175} 
    176176 
    177 $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted'), $_SERVER['REQUEST_URI'] ); 
     177$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] ); 
    178178?> 
    179179</p></div> 
     
    233233)); 
    234234 
     235$is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; 
     236 
    235237?> 
    236238 
     
    238240<select name="action"> 
    239241<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    240 <?php if ($_GET['post_status'] == 'trash') { ?> 
     242<?php if ( $is_trash ) { ?> 
    241243<option value="untrash"><?php _e('Restore'); ?></option> 
    242244<option value="delete"><?php _e('Delete Permanently'); ?></option> 
     
    290292<?php } 
    291293 
    292 if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?> 
     294if ( $is_trash && current_user_can('edit_others_posts') ) { ?> 
    293295<input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    294296<?php } ?> 
     
    326328<select name="action2"> 
    327329<option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 
    328 <?php if ( $_GET['post_status'] == 'trash' ) { ?> 
     330<?php if ( $is_trash ) { ?> 
    329331<option value="untrash"><?php _e('Restore'); ?></option> 
    330332<option value="delete"><?php _e('Delete Permanently'); ?></option> 
     
    335337</select> 
    336338<input type="submit" value="<?php esc_attr_e('Apply'); ?>" name="doaction2" id="doaction2" class="button-secondary action" /> 
    337 <?php if ( $_GET['post_status'] == 'trash' && current_user_can('edit_others_posts') ) { ?> 
     339<?php if ( $is_trash && current_user_can('edit_others_posts') ) { ?> 
    338340<input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 
    339341<?php } ?> 
Note: See TracChangeset for help on using the changeset viewer.