2020-05-01 / 2458阅 / 悠然
Get sanitized Term field.
The function is for contextual reasons and for simplicity of usage.
Top ↑
(string)
(Required)
Term field to fetch.
(int|WP_Term)
(Required)
Term ID or object.
(string)
(Optional)
Taxonomy Name.
Default value: ''
(string)
(Optional)
default is display. Look at sanitize_term_field() for available options.
Default value: 'display'
(string|int|null|WP_Error) Will return an empty string if $term is not an object or if $field is not set in $term.