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
This commit is contained in:
Sergey Biryukov
2020-07-05 10:38:24 +00:00
parent 16dc354833
commit 2fba7f5a68
3 changed files with 11 additions and 11 deletions

View File

@@ -117,7 +117,7 @@ if ( $doaction ) {
}
if ( ! wp_trash_post( $post_id ) ) {
wp_die( __( 'Error in moving to Trash.' ) );
wp_die( __( 'Error in moving the item to Trash.' ) );
}
$trashed++;
@@ -140,7 +140,7 @@ if ( $doaction ) {
}
if ( ! wp_untrash_post( $post_id ) ) {
wp_die( __( 'Error in restoring from Trash.' ) );
wp_die( __( 'Error in restoring the item from Trash.' ) );
}
$untrashed++;
@@ -158,11 +158,11 @@ if ( $doaction ) {
if ( 'attachment' === $post_del->post_type ) {
if ( ! wp_delete_attachment( $post_id ) ) {
wp_die( __( 'Error in deleting.' ) );
wp_die( __( 'Error in deleting the attachment.' ) );
}
} else {
if ( ! wp_delete_post( $post_id ) ) {
wp_die( __( 'Error in deleting.' ) );
wp_die( __( 'Error in deleting the item.' ) );
}
}
$deleted++;