Make WordPress Core

Ticket #29048: 29048.3.patch

File 29048.3.patch, 1.9 KB (added by azaozz, 11 years ago)
  • src/wp-admin/includes/ajax-actions.php

     
    26772677
    26782678        if ( has_shortcode( $parsed, 'audio' ) || has_shortcode( $parsed, 'video' ) ) {
    26792679                $styles = '';
    2680                 $mce_styles = wp_media_mce_styles();
     2680                $mce_styles = wpview_media_sandbox_styles();
    26812681                foreach ( $mce_styles as $style ) {
    26822682                        $styles .= sprintf( '<link rel="stylesheet" href="%s"/>', $style );
    26832683                }
     
    27282728
    27292729        ob_start();
    27302730
    2731         $styles = wp_media_mce_styles();
     2731        $styles = wpview_media_sandbox_styles();
    27322732        foreach ( $styles as $style ) {
    27332733                printf( '<link rel="stylesheet" href="%s"/>', $style );
    27342734        }
  • src/wp-includes/media.php

     
    33083308 *
    33093309 * @return array The relevant CSS file URLs.
    33103310 */
    3311 function wp_media_mce_styles() {
     3311function wpview_media_sandbox_styles() {
    33123312        $version = 'ver=' . $GLOBALS['wp_version'];
    33133313        $dashicons = includes_url( "css/dashicons.css?$version" );
    33143314        $mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
    33153315        $wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
    33163316
    3317         return array( $dashicons, $mediaelement, $wpmediaelement );
     3317        /**
     3318         * For use by themes that need to override the styling of MediaElement previews in the Visual editor.
     3319         * Not intended for adding editor-style.css. Ideally these styles will be applied by using
     3320         * the 'seamless' iframe attribute in the future.
     3321         *
     3322         * @since 4.0
     3323         *
     3324         * @param array The URLs to the stylesheets that will be loaded in the sandbox iframe.
     3325         */                                     
     3326        return apply_filters( 'wpview_media_sandbox_styles', array( $dashicons, $mediaelement, $wpmediaelement ) );
    33183327}