Action hook 'edited_term'

in WP Core File wp-includes/taxonomy.php at line 3463

View Source

edited_term

Action Hook
Description
Fires after a term has been updated, and the term cache has been cleaned. The {@see 'edited_$taxonomy'} hook is also available for targeting a specific taxonomy.

Hook Information

File Location wp-includes/taxonomy.php View on GitHub
Hook Type Action
Line Number 3463

Hook Parameters

Type Name Description
int $term_id Term ID.
int $tt_id Term taxonomy ID.
string $taxonomy Taxonomy slug.
array $args Arguments passed to wp_update_term().

Usage Examples

Basic Usage
<?php
// Hook into edited_term
add_action('edited_term', 'my_custom_function', 10, 4);

function my_custom_function($term_id, $tt_id, $taxonomy, $args) {
    // Your custom code here
}

Source Code Context

wp-includes/taxonomy.php:3463 - How this hook is used in WordPress core
<?php
3458  	 * @param int    $term_id  Term ID.
3459  	 * @param int    $tt_id    Term taxonomy ID.
3460  	 * @param string $taxonomy Taxonomy slug.
3461  	 * @param array  $args     Arguments passed to wp_update_term().
3462  	 */
3463  	do_action( 'edited_term', $term_id, $tt_id, $taxonomy, $args );
3464  
3465  	/**
3466  	 * Fires after a term for a specific taxonomy has been updated, and the term
3467  	 * cache has been cleaned.
3468  	 *

PHP Documentation

<?php
/**
	 * Fires after a term has been updated, and the term cache has been cleaned.
	 *
	 * The {@see 'edited_$taxonomy'} hook is also available for targeting a specific
	 * taxonomy.
	 *
	 * @since 2.3.0
	 * @since 6.1.0 The `$args` parameter was added.
	 *
	 * @param int    $term_id  Term ID.
	 * @param int    $tt_id    Term taxonomy ID.
	 * @param string $taxonomy Taxonomy slug.
	 * @param array  $args     Arguments passed to wp_update_term().
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 4
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.