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
+4 -4
View File
@@ -258,7 +258,7 @@ switch ( $action ) {
}
if ( ! wp_trash_post( $post_id ) ) {
wp_die( __( 'Error in moving to Trash.' ) );
wp_die( __( 'Error in moving the item to Trash.' ) );
}
wp_redirect(
@@ -288,7 +288,7 @@ switch ( $action ) {
}
if ( ! wp_untrash_post( $post_id ) ) {
wp_die( __( 'Error in restoring from Trash.' ) );
wp_die( __( 'Error in restoring the item from Trash.' ) );
}
wp_redirect( add_query_arg( 'untrashed', 1, $sendback ) );
@@ -312,11 +312,11 @@ switch ( $action ) {
if ( 'attachment' === $post->post_type ) {
$force = ( ! MEDIA_TRASH );
if ( ! wp_delete_attachment( $post_id, $force ) ) {
wp_die( __( 'Error in deleting.' ) );
wp_die( __( 'Error in deleting the attachment.' ) );
}
} else {
if ( ! wp_delete_post( $post_id, true ) ) {
wp_die( __( 'Error in deleting.' ) );
wp_die( __( 'Error in deleting the item.' ) );
}
}