mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Audio/Video shortcodes in the media modal:
* Make a generic model, `wp.media.model.PostMedia`, which replaces `wp.media.model.PostAudio` and `wp.media.model.PostVideo` * Make a generic library, `wp.media.controller.MediaLibrary`, which replaces `wp.media.controller.ReplaceVideo` and `wp.media.controller.ReplaceAudio` * `wp.media.controller.MediaLibrary` is used to create new states that want to load a library filtered by type, making it incredibly simple to add states to frames. See `wp.media.view.MediaFrame.VideoDetails` and `wp.media.view.MediaFrame.AudioDetails`. UX changes: * Add the ability to manage HTML5 fallbacks - add additional `<source>`s or remove specific `<source>`s * In the Video Details state, add the ability to select a poster image See #27016. git-svn-id: https://develop.svn.wordpress.org/trunk@27478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -97,7 +97,7 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
frame.on( 'close', function () {
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'video-details' ).on( 'update replace', function ( selection ) {
|
||||
frame.state( 'video-details' ).on( 'update replace add-source select-poster-image', function ( selection ) {
|
||||
var shortcode = wp.media.video.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
@@ -108,7 +108,7 @@ tinymce.PluginManager.add('wpgallery', function( editor ) {
|
||||
frame.on( 'close', function () {
|
||||
frame.detach();
|
||||
} );
|
||||
frame.state( 'audio-details' ).on( 'update replace', function ( selection ) {
|
||||
frame.state( 'audio-details' ).on( 'update replace add-source', function ( selection ) {
|
||||
var shortcode = wp.media.audio.shortcode( selection );
|
||||
editor.dom.setAttrib( node, 'data-wp-media', window.encodeURIComponent( shortcode ) );
|
||||
frame.detach();
|
||||
|
||||
Reference in New Issue
Block a user