Action hook 'edit_terms'

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

View Source

edit_terms

Action Hook
Description
Fires immediately before the given terms are edited.

Hook Information

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

Hook Parameters

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

Usage Examples

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

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

Source Code Context

wp-includes/taxonomy.php:3346 - How this hook is used in WordPress core
<?php
3341  	 *
3342  	 * @param int    $term_id  Term ID.
3343  	 * @param string $taxonomy Taxonomy slug.
3344  	 * @param array  $args     Arguments passed to wp_update_term().
3345  	 */
3346  	do_action( 'edit_terms', $term_id, $taxonomy, $args );
3347  
3348  	$data = compact( 'name', 'slug', 'term_group' );
3349  
3350  	/**
3351  	 * Filters term data before it is updated in the database.

PHP Documentation

<?php
/**
	 * Fires immediately before the given terms are edited.
	 *
	 * @since 2.9.0
	 * @since 6.1.0 The `$args` parameter was added.
	 *
	 * @param int    $term_id  Term ID.
	 * @param string $taxonomy Taxonomy slug.
	 * @param array  $args     Arguments passed to wp_update_term().
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 3
  • File: wp-includes/taxonomy.php
Related Hooks

Related hooks will be displayed here in future updates.