Make WordPress Core


Ignore:
Timestamp:
03/13/2014 11:09:06 PM (12 years ago)
Author:
wonderboymusic
Message:

Add MCE Views for audio and video. Please clear your browser cache so that you get the latest TinyMCE stylesheet.

  • Move TinyMCE shortcode handling from wpgallery plugin to mce-view.js
  • Force preload="none" when rendering media in the editor to ensure fast loading (I realize this sounds illogical)
  • Move audio and video tag builder logic in media-template.php into PHP funcs that can be reused by any code passing data.model to an Underscore template
  • Pause all players when moving between editor tabs and when moving from the editor to editing in the media modal.
  • Rename wp.media.audio|video.shortcode() to the more appropriate wp.media.audio|video.update() that now returns a wp.shortcode object instead of a string.
  • Add necessary MediaElement css files to $mce_css
  • In wp.mce.View.render(), support multiple instances of the same shortcode
  • When rendering wp.mce.Views, fire a ready event that passes the current MCE View root element as context

See #27389.

File:
1 edited

Legend:

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

    r27510 r27528  
    344344                $version = 'ver=' . $GLOBALS['wp_version'];
    345345                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
     346                $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
     347                $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
    346348
    347349                // WordPress default stylesheet and dashicons
    348                 $mce_css = array( $dashicons, self::$baseurl . '/skins/wordpress/wp-content.css' );
     350                $mce_css = array(
     351                    $dashicons,
     352                    $mediaelement,
     353                    $wpmediaelement,
     354                    self::$baseurl . '/skins/wordpress/wp-content.css'
     355                );
    349356
    350357                // load editor_style.css if the current theme supports it
Note: See TracChangeset for help on using the changeset viewer.