Make WordPress Core


Ignore:
Timestamp:
03/06/2014 10:54:32 PM (11 years ago)
Author:
helen
Message:

At long last, a first pass at bringing the image editor into the media modal. props gcorne, DH-Shredder, tomauger. see #21811.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r27411 r27445  
    21762176            'update' => false,
    21772177            'delete' => false,
     2178            'edit'   => false
    21782179        ),
    21792180        'editLink'   => false,
     
    21822183    if ( current_user_can( 'edit_post', $attachment->ID ) ) {
    21832184        $response['nonces']['update'] = wp_create_nonce( 'update-post_' . $attachment->ID );
     2185        $response['nonces']['edit'] = wp_create_nonce( 'image_editor-' . $attachment->ID );
    21842186        $response['editLink'] = get_edit_post_link( $attachment->ID, 'raw' );
    21852187    }
     
    23362338        'update'      => __( 'Update' ),
    23372339        'replace'     => __( 'Replace' ),
     2340        'back'     => __( 'Back' ),
    23382341        /* translators: This is a would-be plural string used in the media manager.
    23392342           If there is not a word you can use in your language to avoid issues with the
     
    23812384        'imageReplaceTitle'     => __( 'Replace Image' ),
    23822385        'imageDetailsCancel'    => __( 'Cancel Edit' ),
     2386        'editImage'             => __( 'Edit Image' ),
    23832387
    23842388        // Edit Image
     
    24222426    wp_enqueue_script( 'media-editor' );
    24232427    wp_enqueue_style( 'media-views' );
     2428    wp_enqueue_style( 'imgareaselect' );
    24242429    wp_plupload_default_settings();
    24252430
Note: See TracChangeset for help on using the changeset viewer.