sanitize_category_field( string $field, mixed $value, int $cat_id, string $context )
Sanitizes data in single category key field.
Description Description
Parameters Parameters
- $field
-
(string) (Required) Category key to sanitize
- $value
-
(mixed) (Required) Category value to sanitize
- $cat_id
-
(int) (Required) Category ID
- $context
-
(string) (Required) What filter to use, 'raw', 'display', etc.
Return Return
(mixed) Same type as $value after $value has been sanitized.
Source 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 ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |