Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aslamatwebdevstudios/f20166e3049bee341ca871a24d7b51f4 to your computer and use it in GitHub Desktop.
Save aslamatwebdevstudios/f20166e3049bee341ca871a24d7b51f4 to your computer and use it in GitHub Desktop.
WordPress Classic Editor Styles
<?php
function my_plugin_add_editor_style() {
$editor_style_url = plugins_url( 'css/editor-style.css', __FILE__ );
$editor_style_path = plugin_dir_path( __FILE__ ) . 'css/editor-style.css';
$editor_style_version = filemtime( $editor_style_path );
add_editor_style( $editor_style_url . '?ver=' . $editor_style_version );
}
add_action( 'admin_init', 'my_plugin_add_editor_style' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment