Uses
Uses | Description |
---|---|
wp-includes/taxonomy.php: sanitize_term_field() | Cleanse the field value in the term based on the context. |
Sanitizes data in single category key field.
(string) (Required) Category key to sanitize.
(mixed) (Required) Category value to sanitize.
(int) (Required) Category ID.
(string) (Required) What filter to use, 'raw', 'display', etc.
(mixed) Same type as $value after $value has been sanitized.
File: wp-includes/category.php
function sanitize_category_field( $field, $value, $cat_id, $context ) { return sanitize_term_field( $field, $value, $cat_id, 'category', $context ); }
Version | Description |
---|---|
2.3.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/sanitize_category_field