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

Sanitizes data in single category key field.

Description Description

Parameters Parameters


(string) (Required) Category key to sanitize


(mixed) (Required) Category value to sanitize


(int) (Required) Category ID


(string) (Required) What filter to use, 'raw', 'display', etc.

Top ↑

Return Return

(mixed) Same type as $value after $value has been sanitized.

Top ↑

Source Source

File: wp-includes/category.php

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

Top ↑

Changelog Changelog

Version Description
2.3.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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