Core Function
View Source on Trac ↗ sanitize_term_field()
sanitize_term_field( mixed $field, mixed $value, mixed $term_id, mixed $taxonomy, mixed $context ) Sanitizes the field value in the term based on the context.
Parameters 5 required
| Name / Type | Description |
|---|---|
| $field string | Term field to sanitize. Required |
| $value string | Search for this term value. Required |
| $term_id int | Term ID. Required |
| $taxonomy string | Taxonomy name. Required |
| string | $context Context in which to sanitize the term field. Accepts 'raw', 'edit', 'db', 'display', 'rss', 'attribute', or 'js'. Default 'display'. Required |
Return Value
(mixed)
Sanitized field.
Function Information
Since Version
2.3.0
Source File
wp-includes/taxonomy.php
Advertisement