mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Trash should always be in titlecase for consistency
git-svn-id: http://svn.automattic.com/wordpress/trunk@14167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
33628516d1
commit
049af4a425
@ -164,11 +164,11 @@ if ( isset($_GET['approved']) || isset($_GET['deleted']) || isset($_GET['trashed
|
||||
|
||||
if ( $trashed > 0 ) {
|
||||
$ids = isset($_GET['ids']) ? $_GET['ids'] : 0;
|
||||
$messages[] = sprintf( _n( '%s comment moved to the trash.', '%s comments moved to the trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
|
||||
$messages[] = sprintf( _n( '%s comment moved to the Trash.', '%s comments moved to the Trash.', $trashed ), $trashed ) . ' <a href="' . esc_url( wp_nonce_url( "edit-comments.php?doaction=undo&action=untrash&ids=$ids", "bulk-comments" ) ) . '">' . __('Undo') . '</a><br />';
|
||||
}
|
||||
|
||||
if ( $untrashed > 0 )
|
||||
$messages[] = sprintf( _n( '%s comment restored from the trash', '%s comments restored from the trash', $untrashed ), $untrashed );
|
||||
$messages[] = sprintf( _n( '%s comment restored from the Trash', '%s comments restored from the Trash', $untrashed ), $untrashed );
|
||||
|
||||
if ( $deleted > 0 )
|
||||
$messages[] = sprintf( _n( '%s comment permanently deleted', '%s comments permanently deleted', $deleted ), $deleted );
|
||||
|
@ -74,10 +74,10 @@ if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delet
|
||||
$trashed = 0;
|
||||
foreach( (array) $post_ids as $post_id ) {
|
||||
if ( !current_user_can($post_type_object->delete_cap, $post_id) )
|
||||
wp_die( __('You are not allowed to move this item to the trash.') );
|
||||
wp_die( __('You are not allowed to move this item to the Trash.') );
|
||||
|
||||
if ( !wp_trash_post($post_id) )
|
||||
wp_die( __('Error in moving to trash...') );
|
||||
wp_die( __('Error in moving to Trash.') );
|
||||
|
||||
$trashed++;
|
||||
}
|
||||
@ -87,10 +87,10 @@ if ( isset($_GET['doaction']) || isset($_GET['doaction2']) || isset($_GET['delet
|
||||
$untrashed = 0;
|
||||
foreach( (array) $post_ids as $post_id ) {
|
||||
if ( !current_user_can($post_type_object->delete_cap, $post_id) )
|
||||
wp_die( __('You are not allowed to restore this item from the trash.') );
|
||||
wp_die( __('You are not allowed to restore this item from the Trash.') );
|
||||
|
||||
if ( !wp_untrash_post($post_id) )
|
||||
wp_die( __('Error in restoring from trash...') );
|
||||
wp_die( __('Error in restoring from Trash.') );
|
||||
|
||||
$untrashed++;
|
||||
}
|
||||
@ -204,7 +204,7 @@ if ( isset($_GET['trashed']) && (int) $_GET['trashed'] ) {
|
||||
}
|
||||
|
||||
if ( isset($_GET['untrashed']) && (int) $_GET['untrashed'] ) {
|
||||
printf( _n( 'Item restored from the trash.', '%s items restored from the trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) );
|
||||
printf( _n( 'Item restored from the Trash.', '%s items restored from the Trash.', $_GET['untrashed'] ), number_format_i18n( $_GET['untrashed'] ) );
|
||||
unset($_GET['undeleted']);
|
||||
}
|
||||
|
||||
@ -262,9 +262,9 @@ endif;
|
||||
</ul>
|
||||
|
||||
<p class="search-box">
|
||||
<label class="screen-reader-text" for="post-search-input"><?php printf( __( 'Search %s' ), $post_type_object->label ); ?>:</label>
|
||||
<label class="screen-reader-text" for="post-search-input"><?php printf( _x('Search %s', '%s: post type name'), $post_type_object->label ); ?>:</label>
|
||||
<input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
|
||||
<input type="submit" value="<?php echo esc_attr( sprintf( __( 'Search %s' ), $post_type_object->label ) ); ?>" class="button" />
|
||||
<input type="submit" value="<?php echo esc_attr( sprintf( _x('Search %s', '%s: post type name'), $post_type_object->label ) ); ?>" class="button" />
|
||||
</p>
|
||||
|
||||
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_GET['post_status']) ? esc_attr($_GET['post_status']) : 'all'; ?>" />
|
||||
|
@ -218,10 +218,10 @@ case 'trash':
|
||||
$post = & get_post($post_id);
|
||||
|
||||
if ( !current_user_can($post_type_object->delete_cap, $post_id) )
|
||||
wp_die( __('You are not allowed to move this item to the trash.') );
|
||||
wp_die( __('You are not allowed to move this item to the Trash.') );
|
||||
|
||||
if ( ! wp_trash_post($post_id) )
|
||||
wp_die( __('Error in moving to trash...') );
|
||||
wp_die( __('Error in moving to Trash.') );
|
||||
|
||||
wp_redirect( add_query_arg( array('trashed' => 1, 'ids' => $post_id), $sendback ) );
|
||||
exit();
|
||||
@ -231,10 +231,10 @@ case 'untrash':
|
||||
check_admin_referer('untrash-' . $post_type . '_' . $post_id);
|
||||
|
||||
if ( !current_user_can($post_type_object->delete_cap, $post_id) )
|
||||
wp_die( __('You are not allowed to move this item out of the trash.') );
|
||||
wp_die( __('You are not allowed to move this item out of the Trash.') );
|
||||
|
||||
if ( ! wp_untrash_post($post_id) )
|
||||
wp_die( __('Error in restoring from trash...') );
|
||||
wp_die( __('Error in restoring from Trash.') );
|
||||
|
||||
wp_redirect( add_query_arg('untrashed', 1, $sendback) );
|
||||
exit();
|
||||
@ -250,10 +250,10 @@ case 'delete':
|
||||
if ( $post->post_type == 'attachment' ) {
|
||||
$force = ( $force || !MEDIA_TRASH );
|
||||
if ( ! wp_delete_attachment($post_id, $force) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
wp_die( __('Error in deleting.') );
|
||||
} else {
|
||||
if ( !wp_delete_post($post_id, $force) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
wp_die( __('Error in deleting.') );
|
||||
}
|
||||
|
||||
wp_redirect( add_query_arg('deleted', 1, $sendback) );
|
||||
|
Loading…
Reference in New Issue
Block a user