Last active
August 29, 2015 14:27
-
-
Save alpha1/ee96eb4e1e1510f2e840 to your computer and use it in GitHub Desktop.
Gravity Forms: Allow (Displaying) HTML in notes
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
| <?php | |
| /* | |
| This will allow Gravity Forms Notes to display HTML. You can already add html to notes, but it will be displayed out as code. | |
| */ | |
| add_action('gform_entry_detail','gravity_forms_add_filter_allow_html'); | |
| add_action('gform_entry_detail_content_before','gravity_forms_add_filter_allow_html'); | |
| add_action('gform_entry_detail_content_after','gravity_forms_remove_filter_allow_html'); | |
| function gravity_forms_add_filter_allow_html(){ | |
| add_filter('esc_html','gravity_forms_notes_allow_html',10,2); | |
| } | |
| function gravity_forms_remove_filter_allow_html(){ | |
| remove_filter('esc_html','gravity_forms_notes_allow_html',10); | |
| } | |
| function gravity_forms_notes_allow_html($safe_text, $text){ | |
| return wp_kses_post($text); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment