get_term_field
get_term_field ( $field, $term, $taxonomy = '', $context = 'display' )
Parameters:- (string) field Term field to fetch.
- (int|WP_Term) term Term ID or object.
- (string) taxonomy Optional. Taxonomy name. Default empty.
- (string) context Optional. How to sanitize term fields. Look at sanitize_term_field() for available options. Default 'display'.
See:Returns:- (string|int|null|WP_Error) Will return an empty string if $term is not an object or if $field is not set in $term.
Defined at:Change Log: - Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Description
Gets sanitized term field.The function is for contextual reasons and for simplicity of usage.