WP_Term::get_instance

Advertisement

Summery Summery

Retrieve WP_Term instance.

Syntax Syntax

WP_Term::get_instance( int $term_id, string $taxonomy = null )

Parameters Parameters

$term_id

(int) (Required) Term ID.

$taxonomy

(string) (Optional) Limit matched terms to those matching $taxonomy. Only used for disambiguating potentially shared terms.

Default value: null

Return Return

(WP_Term|WP_Error|false) Term object, if found. WP_Error if $term_id is shared between taxonomies and there's insufficient data to distinguish which term is intended. False for other failures.

Source Source

File: wp-includes/class-wp-term.php


			

Advertisement

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Advertisement

Leave a Reply

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