sanitize_term_field


sanitize_term_field ( $field, $value, $term_id, $taxonomy, $context )

Parameters:
  • (string) field Term field to sanitize.
  • (string) value Search for this term value.
  • (int) term_id Term ID.
  • (string) taxonomy Taxonomy name.
  • (string) context Context in which to sanitize the term field. Accepts 'raw', 'edit', 'db', 'display', 'rss', 'attribute', or 'js'. Default 'display'.
Returns:
  • (mixed) Sanitized field.
Defined at:

Description

Sanitizes the field value in the term based on the context.Passing a term field value through the function should be assumed to have cleansed the value for whatever context the term field is going to be used. If no context or an unsupported context is given, then default filters will be applied. There are enough filters for each context to support a custom filtering without creating your own filter function. Simply create a function that hooks into the filter you need.

Related Functions

sanitize_text_field, sanitize_user_field, sanitize_category_field, sanitize_textarea_field, _sanitize_text_fields

Top Google Results

User discussions

wpseek mobile