Created
January 18, 2020 02:18
-
-
Save Idealien/7e662129488f030c8f9a63670681622c to your computer and use it in GitHub Desktop.
Disable TinyMCE for a specific step settings editor
This file contains 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_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