set_object_terms хук-событиеWP 2.8.0

Fires after an object's terms have been set.

Использование

add_action( 'set_object_terms', 'wp_kama_set_object_terms_action', 10, 6 );

/**
 * Function for `set_object_terms` action-hook.
 * 
 * @param int    $object_id  Object ID.
 * @param array  $terms      An array of object term IDs or slugs.
 * @param array  $tt_ids     An array of term taxonomy IDs.
 * @param string $taxonomy   Taxonomy slug.
 * @param bool   $append     Whether to append new terms to the old terms.
 * @param array  $old_tt_ids Old array of term taxonomy IDs.
 *
 * @return void
 */
function wp_kama_set_object_terms_action( $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids ){

	// action...
}
$object_id(int)
Object ID.
$terms(массив)
An array of object term IDs or slugs.
$tt_ids(массив)
An array of term taxonomy IDs.
$taxonomy(строка)
Taxonomy slug.
$append(true|false)
Whether to append new terms to the old terms.
$old_tt_ids(массив)
Old array of term taxonomy IDs.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

wp_set_object_terms()
set_object_terms
wp-includes/taxonomy.php 2879
do_action( 'set_object_terms', $object_id, $terms, $tt_ids, $taxonomy, $append, $old_tt_ids );

Где используется хук в WordPress

Использование не найдено.