Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Created August 17, 2015 20:43
Show Gist options
  • Save jtsternberg/cdc2055494a71af77f07 to your computer and use it in GitHub Desktop.
Save jtsternberg/cdc2055494a71af77f07 to your computer and use it in GitHub Desktop.
add editor style (works for front-end editors as well)
<?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