WordPress как на ладони
wordpress jino
фильтр не описан

wp_get_object_terms хук-фильтр . WP 2.8.0

Filters the terms for a given object or objects.

The $taxonomies parameter passed to this filter is formatted as a SQL fragment. The {@see 'get_object_terms'} filter is recommended as an alternative.

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

add_filter( 'wp_get_object_terms', 'filter_function_name_4346', 10, 4 );
function filter_function_name_4346( $terms, $object_ids, $taxonomies, $args ){
	// filter...

	return $terms;
}
$terms(array)
An array of terms for the given object or objects.
$object_ids(int|array)
Object ID or array of IDs.
$taxonomies(string)
SQL-formatted (comma-separated and quoted) list of taxonomy names.
$args(array)
An array of arguments for retrieving terms for the given object(s). See wp_get_object_terms() for details.

Связи хука

Используется в: wp_get_object_terms()

Остальные хуки из: wp_get_object_terms():

Кусок кода с хуком

Фрагмент из: wp-includes/taxonomy.php WP 4.9
...

	/**
	 * Filters the terms for a given object or objects.
	 *
	 * The `$taxonomies` parameter passed to this filter is formatted as a SQL fragment. The
	 * {@see 'get_object_terms'} filter is recommended as an alternative.
	 *
	 * @since 2.8.0
	 *
	 * @param array     $terms      An array of terms for the given object or objects.
	 * @param int|array $object_ids Object ID or array of IDs.
	 * @param string    $taxonomies SQL-formatted (comma-separated and quoted) list of taxonomy names.
	 * @param array     $args       An 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 );
}

/**
 * Add a new term to the database.
 *
 * A non-existent term is inserted in the following sequence:
 * 1. The term is added to the term table, then related to the taxonomy.
 * 2. If everything is correct, several actions are fired.
 * 3. The 'term_id_filter' is evaluated.
 * 4. The term cache is cleaned.
 * 5. Several more actions are fired.
 * 6. An array is returned containing the term_id and term_taxonomy_id.
 *
 * If the 'slug' argument is not empty, then it is checked to see if the term
 * is invalid. If it is not a valid, existing term, it is added and the term_id
...