TinyMCE wpView: add a filter for the stylesheet URLs loaded in the sandbox iframes. See #29048.

git-svn-id: https://develop.svn.wordpress.org/trunk@29559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2014-08-20 21:33:56 +00:00
parent 19a34bb49c
commit 5e838e6f4a
2 changed files with 13 additions and 4 deletions
+11 -2
View File
@@ -3308,11 +3308,20 @@ function attachment_url_to_postid( $url ) {
*
* @return array The relevant CSS file URLs.
*/
function wp_media_mce_styles() {
function wpview_media_sandbox_styles() {
$version = 'ver=' . $GLOBALS['wp_version'];
$dashicons = includes_url( "css/dashicons.css?$version" );
$mediaelement = includes_url( "js/mediaelement/mediaelementplayer.min.css?$version" );
$wpmediaelement = includes_url( "js/mediaelement/wp-mediaelement.css?$version" );
return array( $dashicons, $mediaelement, $wpmediaelement );
/**
* For use by themes that need to override the styling of MediaElement based previews in the Visual editor.
* Not intended for adding editor-style.css. Ideally these styles will be applied by using
* the 'seamless' iframe attribute in the future.
*
* @since 4.0
*
* @param array The URLs to the stylesheets that will be loaded in the sandbox iframe.
*/
return apply_filters( 'wpview_media_sandbox_styles', array( $dashicons, $mediaelement, $wpmediaelement ) );
}