mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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.' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user