sanitize_category_field

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

Sanitizes data in single category key field.

Parameters

  • 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 );

}

2765

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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s

%d bloggers like this: