Last active
December 11, 2015 02:08
-
-
Save gicolek/4528536 to your computer and use it in GitHub Desktop.
tinymce.
This file contains hidden or 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 | |
// alter tinymce body classes | |
function mss_tiny_mce_before_init($init_array) { | |
// accessing global variable post | |
global $post; | |
$title = strtolower ($post->post_title); | |
if($title=='home'){ | |
$init_array['body_class'] = $post->post_title; | |
} | |
return $init_array; | |
} | |
add_filter( 'tiny_mce_before_init', 'mss_tiny_mce_before_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment