Ticket #56170: 56170.1.diff
File 56170.1.diff, 1.4 KB (added by , 21 months ago) |
---|
-
src/wp-admin/upload.php
219 219 } elseif ( isset( $_REQUEST['ids'] ) ) { 220 220 $post_ids = explode( ',', $_REQUEST['ids'] ); 221 221 } 222 $post_ids = array_map( 'intval', (array) $post_ids ); 222 223 223 224 $location = 'upload.php'; 224 225 $referer = wp_get_referer(); … … 241 242 if ( empty( $post_ids ) ) { 242 243 break; 243 244 } 244 foreach ( (array)$post_ids as $post_id ) {245 foreach ( $post_ids as $post_id ) { 245 246 if ( ! current_user_can( 'delete_post', $post_id ) ) { 246 247 wp_die( __( 'Sorry, you are not allowed to move this item to the Trash.' ) ); 247 248 } … … 262 263 if ( empty( $post_ids ) ) { 263 264 break; 264 265 } 265 foreach ( (array)$post_ids as $post_id ) {266 foreach ( $post_ids as $post_id ) { 266 267 if ( ! current_user_can( 'delete_post', $post_id ) ) { 267 268 wp_die( __( 'Sorry, you are not allowed to restore this item from the Trash.' ) ); 268 269 } … … 277 278 if ( empty( $post_ids ) ) { 278 279 break; 279 280 } 280 foreach ( (array)$post_ids as $post_id_del ) {281 foreach ( $post_ids as $post_id_del ) { 281 282 if ( ! current_user_can( 'delete_post', $post_id_del ) ) { 282 283 wp_die( __( 'Sorry, you are not allowed to delete this item.' ) ); 283 284 }