WP_Term::filter()publicWP 4.4.0

Sanitizes term fields, according to the filter type provided.

Method of the class: WP_Term{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Term = new WP_Term();
$WP_Term->filter( $filter );
$filter(string) (required)
Filter context. Accepts 'edit', 'db', 'display', 'attribute', 'js', 'rss', or 'raw'.

Changelog

Since 4.4.0 Introduced.

WP_Term::filter() code WP 6.5.2

public function filter( $filter ) {
	sanitize_term( $this, $this->taxonomy, $filter );
}