WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/27/2012 04:09:43 AM (9 years ago)
Author:
koopersmith
Message:

BUTTON.

Add a "Beta Media" button to the post editor. Currently, it is only capable of inserting images. Other attachment types and galleries need not apply... yet.

  • Added wp.media.string.image( attachment, props ) for generating an image as a string from an attachment and relevant attachment display properties.
  • Properly localized the gallery workflow.
  • Added Workflow.update(), which closes the modal, triggers an update event, and resets the selection.
  • Added wp.mce.media to manage the various media workflows for editors.

see #21813, #21814, #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/script-loader.php

    r22030 r22036  
    298298    ) );
    299299
    300     $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox' ), false, 1 );
     300    $scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'mce-view' ), false, 1 );
    301301
    302302    $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), 'r6', 1 );
     
    318318    $scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'media-models', 'wp-plupload' ), false, 1 );
    319319    did_action( 'init' ) && $scripts->localize( 'media-views', '_wpMediaViewsL10n', array(
    320         'insertMedia'         => __( 'Insert Media' ),
    321         'selectMediaSingular' => __( 'Select a media file:' ),
    322         'selectMediaMultiple' => __( 'Select one or more media files:' ),
    323         'createNewGallery'    => __( 'Create a new gallery' ),
    324         'insertIntoPost'      => __( 'Insert into post' ),
    325         'addToGallery'        => __( 'Add to gallery' ),
     320        // Generic
     321        'insertMedia'           => __( 'Insert Media' ),
     322        'selectMediaSingular'   => __( 'Select a media file:' ),
     323        'selectMediaMultiple'   => __( 'Select one or more media files:' ),
     324
     325        // Library
     326        'createNewGallery'      => __( 'Create a new gallery' ),
     327        'insertIntoPost'        => __( 'Insert into post' ),
     328        'addToGallery'          => __( 'Add to gallery' ),
     329
     330        // Gallery
     331        'returnToLibrary'       => __( 'Return to media library' ),
     332        'insertGalleryIntoPost' => __( 'Insert gallery into post' ),
     333        'addImagesFromLibrary'  => __( 'Add images from media library' ),
    326334    ) );
    327335
Note: See TracChangeset for help on using the changeset viewer.