sanitize_category_field( string $field, mixed $value, int $cat_id, string $context )
Sanitizes data in single category key field.
Parameters
- $field
-
(Required) Category key to sanitize
- $value
-
(Required) Category value to sanitize
- $cat_id
-
(Required) Category ID
- $context
-
(Required) What filter to use, 'raw', 'display', etc.
Return
(mixed) Same type as $value after $value has been sanitized.
Source
File: wp-includes/category.php
function sanitize_category_field( $field, $value, $cat_id, $context ) {
return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
}
Changelog
Version | Description |
---|---|
WP-2.3.0 | Introduced. |