AnsPress_Validation::sanitize( string $field, array $actions )
Description #
Sanitize field based on actions passed
Parameters #
- $fieldstring (Required)
- $actionsarray (Required)
Source #
File: includes/class/validation.php
private function sanitize($field, $actions) { foreach ( $actions as $type ) { switch ( $type ) { case 'sanitize_text_field': $this->sanitize_text_field( $field ); break; case 'only_boolean': $this->only_boolean( $field ); break; case 'only_int': $this->only_int( $field ); break; case 'wp_kses': $this->wp_kses( $field ); break; case 'remove_more': $this->remove_more( $field ); break; case 'strip_shortcodes': $this->strip_shortcodes( $field ); break; case 'encode_pre_code': $this->encode_pre_code( $field ); break; case 'strip_tags': $this->strip_tags( $field ); break; case 'sanitize_tags': $this->sanitize_tags( $field ); break; case 'is_email': $this->is_email( $field ); break; case 'sanitize_description': $this->sanitize_description( $field ); break; default: $this->fields[$field] = apply_filters( 'ap_validation_sanitize_field', $field, $actions ); break; } } }
Expand full source code Collapse full source code View on GitHub: includes/class/validation.php:283
Add your comment