set_object_terms WordPress Action Hook

The set_object_terms hook is triggered when an object is assigned a term in a taxonomy. The hook takes two arguments: the object being assigned the term, and the taxonomy the term belongs to.

do_action( 'set_object_terms', int $object_id, array $terms, array $tt_ids, string $taxonomy, bool $append, array $old_tt_ids ) #

Fires after an object’s terms have been set.


Parameters

$object_id

(int)Object ID.

$terms

(array)An array of object term IDs or slugs.

$tt_ids

(array)An array of term taxonomy IDs.

$taxonomy

(string)Taxonomy slug.

$append

(bool)Whether to append new terms to the old terms.

$old_tt_ids

(array)Old array of term taxonomy IDs.


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
Show More