sanitize_category_field( string $field, mixed $value, int $cat_id, string $context ): mixed

In this article

Sanitizes data in single category key field.

Parameters

$fieldstringrequired
Category key to sanitize.
$valuemixedrequired
Category value to sanitize.
$cat_idintrequired
Category ID.
$contextstringrequired
What filter to use, 'raw', 'display', etc.

Return

mixed Value after $value has been sanitized.

Source

function sanitize_category_field( $field, $value, $cat_id, $context ) {
	return sanitize_term_field( $field, $value, $cat_id, 'category', $context );
}

Changelog

VersionDescription
2.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.