Created
May 5, 2016 16:43
-
-
Save meloniq/46b073d2cf10389dcb1072a45ee35dcc to your computer and use it in GitHub Desktop.
[Vantage] Change Custom-Forms sanitization method for textarea fields
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
<?php | |
function childtheme_custom_forms_textarea_sanitize( $form, $form_id ) { | |
foreach ( $form as $key => $field ) { | |
if ( 'textarea' == $field['type'] ) { | |
$form[ $key ]['sanitize'] = 'wp_kses_post'; | |
} | |
} | |
return $form; | |
} | |
add_filter( 'appthemes_get_custom_form_fields', 'childtheme_custom_forms_textarea_sanitize', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment