Make WordPress Core

Ticket #28038: 28038.patch

File 28038.patch, 719 bytes (added by Clorith, 11 years ago)
  • src/wp-includes/media.php

    <+>UTF-8
     
    25302530                'editLink'   => false,
    25312531        );
    25322532
    2533         if ( current_user_can( 'edit_post', $attachment->ID ) ) {
     2533        if ( current_user_can( 'edit_post', $attachment->ID ) && wp_image_editor_supports( array( 'mime_type' => $attachment->post_mime_type ) ) ) {
    25342534                $response['nonces']['update'] = wp_create_nonce( 'update-post_' . $attachment->ID );
    25352535                $response['nonces']['edit'] = wp_create_nonce( 'image_editor-' . $attachment->ID );
    25362536                $response['editLink'] = get_edit_post_link( $attachment->ID, 'raw' );