sanitize_category
sanitize_category ( $category, $context = 'display' )
Parameters:- (object|array) category Category data.
- (string) context Optional. Default 'display'.
Returns:- (object|array) Same type as $category with sanitized data for safe use.
Defined at: - Introduced in WordPress: 2.3.0
- Deprecated in WordPress: —
Description
Sanitizes category data based on context.