wp_get_object_terms WordPress Filter Hook

The wp_get_object_terms hook is used to retrieve the terms associated with a given object. This hook is called after the object is retrieved from the database, but before any filters are applied to the data.

apply_filters( 'wp_get_object_terms', WP_Term[] $terms, string $object_ids, string $taxonomies, array $args ) #

Filters the terms for a given object or objects.


Description

The $taxonomies parameter passed to this filter is formatted as a SQL fragment. The ‘get_object_terms’ filter is recommended as an alternative.


Top ↑

Parameters

$terms

(WP_Term[])Array of terms for the given object or objects.

$object_ids

(string)Comma separated list of object IDs for which terms were retrieved.

$taxonomies

(string)SQL fragment of taxonomy names from which terms were retrieved.

$args

(array)Array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More