From e0be0aef8baf89d05993495d471e14a0aa19de4f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 5 Jul 2020 10:41:10 +0000 Subject: [PATCH] Posts, Post Types: Clarify some "Error in deleting" messages, use more specific strings for attachments. Props dingo_d. See #50546. Built from https://develop.svn.wordpress.org/trunk@48312 git-svn-id: http://core.svn.wordpress.org/trunk@48081 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 8 ++++---- wp-admin/post.php | 8 ++++---- wp-admin/upload.php | 6 +++--- wp-includes/version.php | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 8313e6e649..f6e85059f3 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -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++; diff --git a/wp-admin/post.php b/wp-admin/post.php index 42610085e3..759e4b6b93 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -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.' ) ); } } diff --git a/wp-admin/upload.php b/wp-admin/upload.php index 4e7c4893cc..3917ece191 100644 --- a/wp-admin/upload.php +++ b/wp-admin/upload.php @@ -156,7 +156,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.' ) ); } } $location = add_query_arg( @@ -177,7 +177,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.' ) ); } } $location = add_query_arg( 'untrashed', count( $post_ids ), $location ); @@ -192,7 +192,7 @@ if ( $doaction ) { } if ( ! wp_delete_attachment( $post_id_del ) ) { - wp_die( __( 'Error in deleting.' ) ); + wp_die( __( 'Error in deleting the attachment.' ) ); } } $location = add_query_arg( 'deleted', count( $post_ids ), $location ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 69bb59c512..5bd6c029ce 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48311'; +$wp_version = '5.5-alpha-48312'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.