Ticket #6838: 6838.diff
| File 6838.diff, 0.6 kB (added by mdawaffe, 7 months ago) |
|---|
-
wp-admin/media.php
old new 9 9 10 10 switch( $action ) : 11 11 case 'editattachment' : 12 $errors = media_upload_form_handler();13 12 $attachment_id = (int) $_POST['attachment_id']; 14 15 13 check_admin_referer('media-form'); 16 14 17 15 if ( !current_user_can('edit_post', $attachment_id) ) 18 16 wp_die ( __('You are not allowed to edit this attachment.') ); 19 17 18 $errors = media_upload_form_handler(); 19 20 20 if ( empty($errors) ) { 21 21 $location = 'media.php'; 22 22 if ( $referer = wp_get_original_referer() ) {
