Created
August 17, 2015 20:43
-
-
Save jtsternberg/cdc2055494a71af77f07 to your computer and use it in GitHub Desktop.
add editor style (works for front-end editors as well)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function wds_add_editor_style( $stylesheet = 'editor-style.min.css' ) { | |
if ( is_admin() ) { | |
// Add styles to the post editor | |
return add_editor_style( $stylesheet ); | |
} | |
/* | |
* We're doing this for CMB2 front-end wysiwyg | |
*/ | |
global $editor_styles; | |
$editor_styles = array_merge( (array) $editor_styles, (array) $stylesheet ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment