Changeset 11779 for trunk/wp-admin/edit.php
- Timestamp:
- 08/06/2009 12:40:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r11778 r11779 25 25 check_admin_referer('bulk-posts'); 26 26 27 if ( isset($_GET['delete_all']) || isset($_GET['delete_all2'])) {27 if ( isset($_GET['delete_all']) || isset($_GET['delete_all2']) ) { 28 28 $post_status = $wpdb->escape($_GET['post_status']); 29 29 $post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='post' AND post_status = '$post_status'" ); … … 167 167 if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { 168 168 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']); 170 170 } 171 171 172 172 if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { 173 printf( _n( 'Post re moved 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'] ) ); 174 174 unset($_GET['undeleted']); 175 175 } 176 176 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'] ); 178 178 ?> 179 179 </p></div> … … 233 233 )); 234 234 235 $is_trash = isset($_GET['post_status']) && $_GET['post_status'] == 'trash'; 236 235 237 ?> 236 238 … … 238 240 <select name="action"> 239 241 <option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 240 <?php if ( $_GET['post_status'] == 'trash') { ?>242 <?php if ( $is_trash ) { ?> 241 243 <option value="untrash"><?php _e('Restore'); ?></option> 242 244 <option value="delete"><?php _e('Delete Permanently'); ?></option> … … 290 292 <?php } 291 293 292 if ( $ _GET['post_status'] == 'trash'&& current_user_can('edit_others_posts') ) { ?>294 if ( $is_trash && current_user_can('edit_others_posts') ) { ?> 293 295 <input type="submit" name="delete_all" id="delete_all" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 294 296 <?php } ?> … … 326 328 <select name="action2"> 327 329 <option value="-1" selected="selected"><?php _e('Bulk Actions'); ?></option> 328 <?php if ( $ _GET['post_status'] == 'trash') { ?>330 <?php if ( $is_trash ) { ?> 329 331 <option value="untrash"><?php _e('Restore'); ?></option> 330 332 <option value="delete"><?php _e('Delete Permanently'); ?></option> … … 335 337 </select> 336 338 <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') ) { ?> 338 340 <input type="submit" name="delete_all2" id="delete_all2" value="<?php esc_attr_e('Empty Trash'); ?>" class="button-secondary apply" /> 339 341 <?php } ?>
Note: See TracChangeset
for help on using the changeset viewer.