2020-05-02 / 3077阅 / 悠然
消毒术语所有字段。
依靠> sanitize_term_field()清理术语。不同之处在于此功能将清除所有字段。上下文基于> sanitize_term_field()。
$ term应该是数组或对象。
(array|object)
(Required)
The term to check.
(string)
(Required)
The taxonomy name to use.
(string)
(Optional)
Context in which to sanitize the term. Accepts 'edit', 'db', 'display', 'attribute', or 'js'.
Default value: 'display'
(array|object) Term with all fields sanitized.