Changeset 13153
- Timestamp:
- 02/14/2010 01:17:31 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upload.php
r13100 r13153 91 91 wp_die( __('Error in moving to trash...') ); 92 92 } 93 $location = add_query_arg( array( ' message' => 4, 'ids' => join(',', $post_ids) ), $location );93 $location = add_query_arg( array( 'trashed' => count($post_ids), 'ids' => join(',', $post_ids) ), $location ); 94 94 break; 95 95 case 'untrash': … … 101 101 wp_die( __('Error in restoring from trash...') ); 102 102 } 103 $location = add_query_arg(' message', 5, $location);103 $location = add_query_arg('untrashed', count($post_ids), $location); 104 104 break; 105 105 case 'delete': … … 111 111 wp_die( __('Error in deleting...') ); 112 112 } 113 $location = add_query_arg(' message', 2, $location);113 $location = add_query_arg('deleted', count($post_ids), $location); 114 114 break; 115 115 } … … 176 176 $message = ''; 177 177 if ( isset($_GET['posted']) && (int) $_GET['posted'] ) { 178 $ _GET['message'] = '1';178 $message = __('Media attachment updated.'); 179 179 $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 180 180 } … … 182 182 if ( isset($_GET['attached']) && (int) $_GET['attached'] ) { 183 183 $attached = (int) $_GET['attached']; 184 $message = sprintf( _n('Reattached %d attachment ', 'Reattached %d attachments', $attached), $attached );184 $message = sprintf( _n('Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached ); 185 185 $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']); 186 186 } 187 187 188 188 if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) { 189 $ _GET['message'] = '2';189 $message = sprintf( _n( 'Media attachment permanently deleted.', '%d media attachments permanently deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) ); 190 190 $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']); 191 191 } 192 192 193 193 if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) { 194 $_GET['message'] = '4'; 194 $message = sprintf( _n( 'Media attachment moved to the trash.', '%d media attachments moved to the trash.', $_GET['trashed'] ), number_format_i18n( $_GET['trashed'] ) ); 195 $message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>'; 195 196 $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']); 196 197 } 197 198 198 199 if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) { 199 $ _GET['message'] = '5';200 $message = sprintf( _n( 'Media attachment restored from the trash.', '%d media attachments restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) ); 200 201 $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']); 201 202 }
Note: See TracChangeset
for help on using the changeset viewer.