function sanitize_category_field( $field, $value, $cat_id, $context ) {}

Sanitizes data in single category key field.


  • string $field: Category key to sanitize
  • mixed $value: Category value to sanitize
  • int $cat_id: Category ID
  • string $context: What filter to use, ‘raw’, ‘display’, etc.

Return values

returns:Same type as $value after $value has been sanitized.

Source code

function sanitize_category_field( $field, $value, $cat_id, $context ) {

	return sanitize_term_field( $field, $value, $cat_id, 'category', $context );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: