Ticket #28038: 28038.diff
File 28038.diff, 1.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/media.php
2532 2532 2533 2533 if ( current_user_can( 'edit_post', $attachment->ID ) ) { 2534 2534 $response['nonces']['update'] = wp_create_nonce( 'update-post_' . $attachment->ID ); 2535 $response['nonces']['edit'] = wp_create_nonce( 'image_editor-' . $attachment->ID );2536 2535 $response['editLink'] = get_edit_post_link( $attachment->ID, 'raw' ); 2536 2537 if ( 0 === strpos( $attachment->post_mime_type, 'image/' ) ) { 2538 static $image_editor_supports = array(); 2539 if ( ! isset( $image_editor_supports[ $attachment->post_mime_type ] ) ) { 2540 $image_editor_supports[ $attachment->post_mime_type ] = wp_image_editor_supports( array( 'mime_type' => $attachment->post_mime_type ) ); 2541 } 2542 2543 if ( $image_editor_supports[ $attachment->post_mime_type ] ) { 2544 $response['nonces']['edit'] = wp_create_nonce( 'image_editor-' . $attachment->ID ); 2545 } 2546 } 2537 2547 } 2538 2548 2539 2549 if ( current_user_can( 'delete_post', $attachment->ID ) )