Created
October 30, 2015 03:09
-
-
Save seandenigris/cedd0523ebe2aa9fb1b7 to your computer and use it in GitHub Desktop.
WordPress Disable TinyMCE Tag Stripping
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
| // Add to functions.php to disable tag stripping from visual editor | |
| // From http://wordpress.stackexchange.com/questions/52582/how-to-disable-tinymce-from-removing-span-tags | |
| function override_mce_options($initArray) { | |
| $opts = '*[*]'; | |
| $initArray['valid_elements'] = $opts; | |
| $initArray['extended_valid_elements'] = $opts; | |
| return $initArray; | |
| } | |
| add_filter('tiny_mce_before_init', 'override_mce_options'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great! This is just what I was looking for! Thanks!