sanitize_term


sanitize_term ( $term, $taxonomy, $context = 'display' )

Parameters:
  • (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 'raw', 'edit', 'db', 'display', 'rss', 'attribute', or 'js'. Default 'display'.
Returns:
  • (array|object) Term with all fields sanitized.
Defined at:

Description

Sanitizes all term fields.Relies on sanitize_term_field() to sanitize the term. The difference is that this function will sanitize **all** fields. The context is based on sanitize_term_field(). The `$term` is expected to be either an array or an object.

Related Functions

sanitize_user, sanitize_email, sanitize_term_field, sanitize_title, sanitize_category

Top Google Results

User discussions

wpseek mobile