Changeset 31941 for trunk/src/wp-admin/upload.php
- Timestamp:
- 03/31/2015 06:44:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/upload.php
r31696 r31941 220 220 $message = ''; 221 221 if ( ! empty( $_GET['posted'] ) ) { 222 $message = __( 'Media attachment updated.');222 $message = __( 'Media attachment updated.' ); 223 223 $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 224 224 } 225 225 226 226 if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) { 227 $message = sprintf( _n( 'Reattached %d attachment.', 'Reattached %d attachments.', $attached), $attached );227 $message = sprintf( _n( 'Reattached %d attachment.', 'Reattached %d attachments.', $attached ), $attached ); 228 228 $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] ); 229 229 } … … 235 235 236 236 if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) { 237 $message = sprintf( _n( 'Media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted ), number_format_i18n( $_GET['deleted'] ) ); 237 if ( 1 == $deleted ) { 238 $message = __( 'Media attachment permanently deleted.' ); 239 } else { 240 $message = _n( '%d media attachment permanently deleted.', '%d media attachments permanently deleted.', $deleted ); 241 } 242 $message = sprintf( $message, number_format_i18n( $deleted ) ); 238 243 $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']); 239 244 } 240 245 241 246 if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) { 242 $message = sprintf( _n( 'Media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed ), number_format_i18n( $_GET['trashed'] ) ); 247 if ( 1 == $trashed ) { 248 $message = __( 'Media attachment moved to the trash.' ); 249 } else { 250 $message = _n( '%d media attachment moved to the trash.', '%d media attachments moved to the trash.', $trashed ); 251 } 252 $message = sprintf( $message, number_format_i18n( $trashed ) ); 243 253 $message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>'; 244 254 $_SERVER['REQUEST_URI'] = remove_query_arg(array('trashed'), $_SERVER['REQUEST_URI']); … … 246 256 247 257 if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) { 248 $message = sprintf( _n( 'Media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ), number_format_i18n( $_GET['untrashed'] ) ); 258 if ( 1 == $untrashed ) { 259 $message = __( 'Media attachment restored from the trash.' ); 260 } else { 261 $message = _n( '%d media attachment restored from the trash.', '%d media attachments restored from the trash.', $untrashed ); 262 } 263 $message = sprintf( $message, number_format_i18n( $untrashed ) ); 249 264 $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']); 250 265 }
Note: See TracChangeset
for help on using the changeset viewer.