Action hook 'edited_term_taxonomy'

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

View Source

edited_term_taxonomy

Action Hook
Description
Updates term count based on number of objects. Default callback for the 'link_category' taxonomy.

Hook Information

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

Hook Parameters

Type Name Description
int[] $terms List of term taxonomy IDs.
WP_Taxonomy $taxonomy Current taxonomy object of terms.

Usage Examples

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

function my_custom_function($terms, $taxonomy) {
    // Your custom code here
}

Source Code Context

wp-includes/taxonomy.php:4218 - How this hook is used in WordPress core
<?php
4213  		/** This action is documented in wp-includes/taxonomy.php */
4214  		do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
4215  		$wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
4216  
4217  		/** This action is documented in wp-includes/taxonomy.php */
4218  		do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
4219  	}
4220  }
4221  
4222  /**
4223   * Creates a new term for a term_taxonomy item that currently shares its term

PHP Documentation

<?php
/**
 * Updates term count based on number of objects.
 *
 * Default callback for the 'link_category' taxonomy.
 *
 * @since 3.3.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param int[]       $terms    List of term taxonomy IDs.
 * @param WP_Taxonomy $taxonomy Current taxonomy object of terms.
 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.