sanitize_term ( $term, $taxonomy, $context = 'display' )
- (array|object) $term The term to check.
- (string) $taxonomy The taxonomy name to use.
- (string) $context Optional. Context in which to sanitize the term. Accepts 'edit', 'db', 'display', 'attribute', or 'js'. Default 'display'.
- (array|object) Term with all fields sanitized.
- Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Sanitize Term all fields.
Relies on sanitize_term_field() to sanitize the term. The difference is that
this function will sanitize all fields. The context is based
The $term is expected to be either an array or an object.