Skip to content

Instantly share code, notes, and snippets.

@Idealien
Created January 18, 2020 02:18
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 Idealien/7e662129488f030c8f9a63670681622c to your computer and use it in GitHub Desktop.
Save Idealien/7e662129488f030c8f9a63670681622c to your computer and use it in GitHub Desktop.
Disable TinyMCE for a specific step settings editor
add_action( 'admin_init', 'disable_tinymce_in_gf' );
function disable_tinymce_in_gf() {
if (rgget('fid')){
$step_id = rgget('fid');
if ($step_id == 552) {
if ( RGForms::is_gravity_page() &&
rgget( 'page' ) == 'gf_edit_forms' &&
rgget( 'view' ) == 'settings' &&
in_array( rgget( 'subview' ), array( 'notification', 'confirmation', 'gravityflow' ) )
) {
add_filter( 'user_can_richedit', '__return_false' );
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment