Skip to content

Instantly share code, notes, and snippets.

@meloniq
Created May 5, 2016 16:43
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 meloniq/46b073d2cf10389dcb1072a45ee35dcc to your computer and use it in GitHub Desktop.
Save meloniq/46b073d2cf10389dcb1072a45ee35dcc to your computer and use it in GitHub Desktop.
[Vantage] Change Custom-Forms sanitization method for textarea fields
<?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