Skip to content

Instantly share code, notes, and snippets.

@eccentricpixel
Created November 6, 2014 05:38
Show Gist options
  • Save eccentricpixel/074c6eb749fa49ee6672 to your computer and use it in GitHub Desktop.
Save eccentricpixel/074c6eb749fa49ee6672 to your computer and use it in GitHub Desktop.
Since Wordpress continues to be plagued by the problem of stripping tags/html when switching between the visual and text/html tabs in the tinyMCE editor, this snippet added to your theme's functions.php file will disable the visual tab entirely for ALL USERS.
/* Disable visual tab for ALL USERS
* ================================================== */
add_filter('user_can_richedit' , create_function('' , 'return false;') , 50);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment