edit_(taxonomy) хук-событиеWP 2.3.0

Fires after a term in a specific taxonomy has been updated, but before the term cache has been cleaned.

The dynamic portion of the hook name, $taxonomy, refers to the taxonomy slug.

Possible hook names include:

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

add_action( 'edit_(taxonomy)', 'wp_kama_edit_taxonomy_action', 10, 3 );

/**
 * Function for `edit_(taxonomy)` action-hook.
 * 
 * @param int   $term_id Term ID.
 * @param int   $tt_id   Term taxonomy ID.
 * @param array $args    Arguments passed to wp_update_term().
 *
 * @return void
 */
function wp_kama_edit_taxonomy_action( $term_id, $tt_id, $args ){

	// action...
}
$term_id(int)
Term ID.
$tt_id(int)
Term taxonomy ID.
$args(массив)
Arguments passed to wp_update_term().

Список изменений

С версии 2.3.0 Введена.
С версии 6.1.0 The $args parameter was added.

Где вызывается хук

wp_update_term()
edit_(taxonomy)
wp-includes/taxonomy.php 3353
do_action( "edit_{$taxonomy}", $term_id, $tt_id, $args );

Где используется хук в WordPress

wp-admin/edit-form-advanced.php 82
add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
wp-admin/includes/admin-filters.php 89
add_action( 'edit_form_after_title', '_disable_content_editor_for_navigation_post_type' );
wp-admin/includes/admin-filters.php 90
add_action( 'edit_form_after_editor', '_enable_content_editor_for_navigation_post_type' );
wp-admin/includes/meta-boxes.php 1480
add_action( 'edit_form_after_title', 'edit_form_image_editor' );
wp-includes/class-wp-embed.php 46
add_action( 'edit_form_advanced', array( $this, 'maybe_run_ajax_cache' ) );
wp-includes/class-wp-embed.php 47
add_action( 'edit_page_form', array( $this, 'maybe_run_ajax_cache' ) );
wp-includes/default-filters.php 501
add_action( 'edit_user_created_user', 'wp_send_new_user_notifications', 10, 2 );