Changeset 19259 for trunk/wp-admin/edit.php
- Timestamp:
- 11/11/2011 08:01:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r19119 r19259 198 198 </h2> 199 199 200 <?php 201 if ( isset($_REQUEST['posted']) && $_REQUEST['posted'] ) : $_REQUEST['posted'] = (int) $_REQUEST['posted']; ?> 202 <div id="message" class="updated"><p><strong><?php _e('This has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_REQUEST['posted'] ); ?>"><?php _e('View Post'); ?></a> | <a href="<?php echo get_edit_post_link( $_REQUEST['posted'] ); ?>"><?php _e('Edit Post'); ?></a></p></div> 203 <?php $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']); 204 endif; ?> 205 206 <?php if ( isset($_REQUEST['locked']) || isset($_REQUEST['skipped']) || isset($_REQUEST['updated']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) ) { ?> 200 <?php if ( isset($_REQUEST['locked']) || isset($_REQUEST['skipped']) || isset($_REQUEST['updated']) || isset($_REQUEST['deleted']) || isset($_REQUEST['trashed']) || isset($_REQUEST['untrashed']) ) { 201 $messages = array(); 202 ?> 207 203 <div id="message" class="updated"><p> 208 204 <?php if ( isset($_REQUEST['updated']) && (int) $_REQUEST['updated'] ) { 209 printf( _n( '%s post updated.', '%s posts updated.', $_REQUEST['updated'] ), number_format_i18n( $_REQUEST['updated'] ) );205 $messages[] = sprintf( _n( '%s post updated.', '%s posts updated.', $_REQUEST['updated'] ), number_format_i18n( $_REQUEST['updated'] ) ); 210 206 unset($_REQUEST['updated']); 211 207 } … … 215 211 216 212 if ( isset($_REQUEST['locked']) && (int) $_REQUEST['locked'] ) { 217 printf( _n( '%s item not updated, somebody is editing it.', '%s items not updated, somebody is editing them.', $_REQUEST['locked'] ), number_format_i18n( $_REQUEST['locked'] ) );213 $messages[] = sprintf( _n( '%s item not updated, somebody is editing it.', '%s items not updated, somebody is editing them.', $_REQUEST['locked'] ), number_format_i18n( $_REQUEST['locked'] ) ); 218 214 unset($_REQUEST['locked']); 219 215 } 220 216 221 217 if ( isset($_REQUEST['deleted']) && (int) $_REQUEST['deleted'] ) { 222 printf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $_REQUEST['deleted'] ), number_format_i18n( $_REQUEST['deleted'] ) );218 $messages[] = sprintf( _n( 'Item permanently deleted.', '%s items permanently deleted.', $_REQUEST['deleted'] ), number_format_i18n( $_REQUEST['deleted'] ) ); 223 219 unset($_REQUEST['deleted']); 224 220 } 225 221 226 222 if ( isset($_REQUEST['trashed']) && (int) $_REQUEST['trashed'] ) { 227 printf( _n( 'Item moved to the Trash.', '%s items moved to the Trash.', $_REQUEST['trashed'] ), number_format_i18n( $_REQUEST['trashed'] ) );223 $messages[] = sprintf( _n( 'Item moved to the Trash.', '%s items moved to the Trash.', $_REQUEST['trashed'] ), number_format_i18n( $_REQUEST['trashed'] ) ); 228 224 $ids = isset($_REQUEST['ids']) ? $_REQUEST['ids'] : 0; 229 echo ' <a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a><br />';225 $messages[] = '<a href="' . esc_url( wp_nonce_url( "edit.php?post_type=$post_type&doaction=undo&action=untrash&ids=$ids", "bulk-posts" ) ) . '">' . __('Undo') . '</a>'; 230 226 unset($_REQUEST['trashed']); 231 227 } 232 228 233 229 if ( isset($_REQUEST['untrashed']) && (int) $_REQUEST['untrashed'] ) { 234 printf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_REQUEST['untrashed'] ), number_format_i18n( $_REQUEST['untrashed'] ) );230 $messages[] = sprintf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_REQUEST['untrashed'] ), number_format_i18n( $_REQUEST['untrashed'] ) ); 235 231 unset($_REQUEST['undeleted']); 236 232 } 233 234 if ( $messages ) 235 echo join( ' ', $messages ); 236 unset( $messages ); 237 237 238 238 $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted', 'trashed', 'untrashed'), $_SERVER['REQUEST_URI'] );
Note: See TracChangeset
for help on using the changeset viewer.