Skip to content

Instantly share code, notes, and snippets.

@bacoords
Last active February 23, 2018 15:24
Show Gist options
  • Save bacoords/0e0a4b586e03288127d5d84b729a5737 to your computer and use it in GitHub Desktop.
Save bacoords/0e0a4b586e03288127d5d84b729a5737 to your computer and use it in GitHub Desktop.
Disables the visual editor on Caldera forms backend so things like HTML emails don't get messed up
<?php
// Disables the visual editor on Caldera forms backend so things like HTML emails don't get messed up
add_filter( 'user_can_richedit', 'caldera_page_can_richedit' );
function caldera_page_can_richedit( $can )
{
$screen = get_current_screen();
if( $screen->id == 'toplevel_page_caldera-forms'){
return false;
}
return $can;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment