wppaste
WordPress

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

Since
2.8.0
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.

Compatibility

WordPress
since 2.8.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$terms\WP_Term[]|int[]|string[]|string
Array of terms or a count thereof as a numeric string.
$object_idsstring
Comma separated list of object IDs for which terms were retrieved.
$taxonomiesstring
SQL fragment of taxonomy names from which terms were retrieved.
$argsarray
Array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.

Where this hook fires · 1

  • wp-includes/taxonomy.php:2374wp_get_object_terms()

Source code

	 * @param WP_Term[]|int[]|string[]|string $terms      Array of terms or a count thereof as a numeric string.	 * @param string                          $object_ids Comma separated list of object IDs for which terms were retrieved.	 * @param string                          $taxonomies SQL fragment of taxonomy names from which terms were retrieved.	 * @param array                           $args       Array of arguments for retrieving terms for the given	 *                                                    object(s). See wp_get_object_terms() for details.	 */	return apply_filters( 'wp_get_object_terms', $terms, $object_ids, $taxonomies, $args );} /** * Adds a new term to the database. * * A non-existent term is inserted in the following sequence:

Changelog

Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.