wp_update_term_data filter-hookWP 4.7.0

Filters term data before it is updated in the database.

Usage

add_filter( 'wp_update_term_data', 'wp_kama_update_term_data_filter', 10, 4 );

/**
 * Function for `wp_update_term_data` filter-hook.
 * 
 * @param array  $data     Term data to be updated.
 * @param int    $term_id  Term ID.
 * @param string $taxonomy Taxonomy slug.
 * @param array  $args     Arguments passed to wp_update_term().
 *
 * @return array
 */
function wp_kama_update_term_data_filter( $data, $term_id, $taxonomy, $args ){

	// filter...
	return $data;
}
$data(array)
Term data to be updated.
$term_id(int)
Term ID.
$taxonomy(string)
Taxonomy slug.
$args(array)
Arguments passed to wp_update_term().

Changelog

Since 4.7.0 Introduced.

Where the hook is called

wp_update_term()
wp_update_term_data
wp-includes/taxonomy.php 3271
$data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );

Where the hook is used in WordPress

Usage not found.