Make WordPress Core


Ignore:
Timestamp:
03/14/2014 12:33:24 PM (11 years ago)
Author:
wonderboymusic
Message:

Load MediaElement's CSS when TinyMCE is loaded via $mce_css in editor_settings(). Add some baseline styles in wp-content.css for audio, video, and embed tags to ensure their max-width is 100%, regardless of whether MEjs is implemented in TinyMCE.

See #27389.

File:
1 edited

Legend:

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

    r27532 r27534  
    344344                $version = 'ver=' . $GLOBALS['wp_version'];
    345345                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
    346 
     346                $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
     347                $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
     348               
    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.