sanitize_category

Advertisement

Summery Summery

Sanitizes category data based on context.

Syntax Syntax

sanitize_category( object|array $category, string $context = 'display' )

Parameters Parameters

$category

(object|array) (Required) Category data.

$context

(string) (Optional)

Default value: 'display'

Return Return

(object|array) Same type as $category with sanitized data for safe use.

Source Source

File: wp-includes/category.php

 * Sanitizes data in single category key field.
 *
 * @since 2.3.0

Advertisement

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.