WordPress at a glance
function is not described

sanitize_category() WP 2.3.0

Sanitizes category data based on context.

No Hooks.

Return

Object/Array. Same type as $category with sanitized data for safe use.

Usage

sanitize_category( $category, $context );
$category(object/array) (required)
Category data
$context(string)
Optional.
Default: 'display'

Changelog

Since 2.3.0 Introduced.

Code of sanitize category: wp-includes/category.php WP 5.2.2

<?php
function sanitize_category( $category, $context = 'display' ) {
	return sanitize_term( $category, 'category', $context );
}