Skip to content

Commit 2fba7f5

Browse files
Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments.
Props dingo_d. See #50546. git-svn-id: https://develop.svn.wordpress.org/trunk@48312 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 16dc354 commit 2fba7f5

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/wp-admin/edit.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
}
118118

119119
if ( ! wp_trash_post( $post_id ) ) {
120-
wp_die( __( 'Error in moving to Trash.' ) );
120+
wp_die( __( 'Error in moving the item to Trash.' ) );
121121
}
122122

123123
$trashed++;
@@ -140,7 +140,7 @@
140140
}
141141

142142
if ( ! wp_untrash_post( $post_id ) ) {
143-
wp_die( __( 'Error in restoring from Trash.' ) );
143+
wp_die( __( 'Error in restoring the item from Trash.' ) );
144144
}
145145

146146
$untrashed++;
@@ -158,11 +158,11 @@
158158

159159
if ( 'attachment' === $post_del->post_type ) {
160160
if ( ! wp_delete_attachment( $post_id ) ) {
161-
wp_die( __( 'Error in deleting.' ) );
161+
wp_die( __( 'Error in deleting the attachment.' ) );
162162
}
163163
} else {
164164
if ( ! wp_delete_post( $post_id ) ) {
165-
wp_die( __( 'Error in deleting.' ) );
165+
wp_die( __( 'Error in deleting the item.' ) );
166166
}
167167
}
168168
$deleted++;

src/wp-admin/post.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@
258258
}
259259

260260
if ( ! wp_trash_post( $post_id ) ) {
261-
wp_die( __( 'Error in moving to Trash.' ) );
261+
wp_die( __( 'Error in moving the item to Trash.' ) );
262262
}
263263

264264
wp_redirect(
@@ -288,7 +288,7 @@
288288
}
289289

290290
if ( ! wp_untrash_post( $post_id ) ) {
291-
wp_die( __( 'Error in restoring from Trash.' ) );
291+
wp_die( __( 'Error in restoring the item from Trash.' ) );
292292
}
293293

294294
wp_redirect( add_query_arg( 'untrashed', 1, $sendback ) );
@@ -312,11 +312,11 @@
312312
if ( 'attachment' === $post->post_type ) {
313313
$force = ( ! MEDIA_TRASH );
314314
if ( ! wp_delete_attachment( $post_id, $force ) ) {
315-
wp_die( __( 'Error in deleting.' ) );
315+
wp_die( __( 'Error in deleting the attachment.' ) );
316316
}
317317
} else {
318318
if ( ! wp_delete_post( $post_id, true ) ) {
319-
wp_die( __( 'Error in deleting.' ) );
319+
wp_die( __( 'Error in deleting the item.' ) );
320320
}
321321
}
322322

src/wp-admin/upload.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
}
157157

158158
if ( ! wp_trash_post( $post_id ) ) {
159-
wp_die( __( 'Error in moving to Trash.' ) );
159+
wp_die( __( 'Error in moving the item to Trash.' ) );
160160
}
161161
}
162162
$location = add_query_arg(
@@ -177,7 +177,7 @@
177177
}
178178

179179
if ( ! wp_untrash_post( $post_id ) ) {
180-
wp_die( __( 'Error in restoring from Trash.' ) );
180+
wp_die( __( 'Error in restoring the item from Trash.' ) );
181181
}
182182
}
183183
$location = add_query_arg( 'untrashed', count( $post_ids ), $location );
@@ -192,7 +192,7 @@
192192
}
193193

194194
if ( ! wp_delete_attachment( $post_id_del ) ) {
195-
wp_die( __( 'Error in deleting.' ) );
195+
wp_die( __( 'Error in deleting the attachment.' ) );
196196
}
197197
}
198198
$location = add_query_arg( 'deleted', count( $post_ids ), $location );

0 commit comments

Comments
 (0)