Ticket #50546: 50546.diff
File 50546.diff, 3.0 KB (added by , 3 years ago) |
---|
-
src/wp-admin/edit.php
117 117 } 118 118 119 119 if ( ! wp_trash_post( $post_id ) ) { 120 wp_die( __( 'Error in moving t o Trash.' ) );120 wp_die( __( 'Error in moving the item to Trash.' ) ); 121 121 } 122 122 123 123 $trashed++; … … 140 140 } 141 141 142 142 if ( ! wp_untrash_post( $post_id ) ) { 143 wp_die( __( 'Error in restoring from Trash.' ) );143 wp_die( __( 'Error in restoring the item from Trash.' ) ); 144 144 } 145 145 146 146 $untrashed++; … … 158 158 159 159 if ( 'attachment' === $post_del->post_type ) { 160 160 if ( ! wp_delete_attachment( $post_id ) ) { 161 wp_die( __( 'Error in deleting .' ) );161 wp_die( __( 'Error in deleting the attachment.' ) ); 162 162 } 163 163 } else { 164 164 if ( ! wp_delete_post( $post_id ) ) { 165 wp_die( __( 'Error in deleting .' ) );165 wp_die( __( 'Error in deleting the item.' ) ); 166 166 } 167 167 } 168 168 $deleted++; -
src/wp-admin/post.php
258 258 } 259 259 260 260 if ( ! wp_trash_post( $post_id ) ) { 261 wp_die( __( 'Error in moving t o Trash.' ) );261 wp_die( __( 'Error in moving the item to Trash.' ) ); 262 262 } 263 263 264 264 wp_redirect( … … 288 288 } 289 289 290 290 if ( ! wp_untrash_post( $post_id ) ) { 291 wp_die( __( 'Error in restoring from Trash.' ) );291 wp_die( __( 'Error in restoring the item from Trash.' ) ); 292 292 } 293 293 294 294 wp_redirect( add_query_arg( 'untrashed', 1, $sendback ) ); … … 312 312 if ( 'attachment' === $post->post_type ) { 313 313 $force = ( ! MEDIA_TRASH ); 314 314 if ( ! wp_delete_attachment( $post_id, $force ) ) { 315 wp_die( __( 'Error in deleting .' ) );315 wp_die( __( 'Error in deleting the attachment.' ) ); 316 316 } 317 317 } else { 318 318 if ( ! wp_delete_post( $post_id, true ) ) { 319 wp_die( __( 'Error in deleting .' ) );319 wp_die( __( 'Error in deleting the item.' ) ); 320 320 } 321 321 } 322 322 -
src/wp-admin/upload.php
156 156 } 157 157 158 158 if ( ! wp_trash_post( $post_id ) ) { 159 wp_die( __( 'Error in moving t o Trash.' ) );159 wp_die( __( 'Error in moving the item to Trash.' ) ); 160 160 } 161 161 } 162 162 $location = add_query_arg( … … 177 177 } 178 178 179 179 if ( ! wp_untrash_post( $post_id ) ) { 180 wp_die( __( 'Error in restoring from Trash.' ) );180 wp_die( __( 'Error in restoring the item from Trash.' ) ); 181 181 } 182 182 } 183 183 $location = add_query_arg( 'untrashed', count( $post_ids ), $location ); … … 192 192 } 193 193 194 194 if ( ! wp_delete_attachment( $post_id_del ) ) { 195 wp_die( __( 'Error in deleting .' ) );195 wp_die( __( 'Error in deleting the attachment.' ) ); 196 196 } 197 197 } 198 198 $location = add_query_arg( 'deleted', count( $post_ids ), $location );