sanitize_term

Advertisement

Summery Summery

Sanitize Term all fields.

Syntax Syntax

sanitize_term( array|object $term, string $taxonomy, string $context = 'display' )

Description Description

Relies on sanitize_term_field() to sanitize the term. The difference is that this function will sanitize all fields. The context is based on sanitize_term_field().

The $term is expected to be either an array or an object.

Parameters Parameters

$term

(array|object) (Required) The term to check.

$taxonomy

(string) (Required) The taxonomy name to use.

$context

(string) (Optional) Context in which to sanitize the term. Accepts 'edit', 'db', 'display', 'attribute', or 'js'.

Default value: 'display'

Return Return

(array|object) Term with all fields sanitized.

Source Source

File: wp-includes/taxonomy.php


			

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.