edit_term_taxonomies
Action HookDescription
Fires immediately before a term to delete's children are reassigned a parent.Hook Information
File Location |
wp-includes/taxonomy.php
View on GitHub
|
Hook Type | Action |
Line Number | 2102 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$edit_tt_ids
|
An array of term taxonomy IDs for the given term. |
Usage Examples
Basic Usage
<?php
// Hook into edit_term_taxonomies
add_action('edit_term_taxonomies', 'my_custom_function', 10, 1);
function my_custom_function($edit_tt_ids) {
// Your custom code here
}
Source Code Context
wp-includes/taxonomy.php:2102
- How this hook is used in WordPress core
<?php
2097 *
2098 * @since 2.9.0
2099 *
2100 * @param array $edit_tt_ids An array of term taxonomy IDs for the given term.
2101 */
2102 do_action( 'edit_term_taxonomies', $edit_tt_ids );
2103
2104 $wpdb->update( $wpdb->term_taxonomy, compact( 'parent' ), array( 'parent' => $term_obj->term_id ) + compact( 'taxonomy' ) );
2105
2106 // Clean the cache for all child terms.
2107 $edit_term_ids = wp_list_pluck( $edit_ids, 'term_id' );
PHP Documentation
<?php
/**
* Fires immediately before a term to delete's children are reassigned a parent.
*
* @since 2.9.0
*
* @param array $edit_tt_ids An array of term taxonomy IDs for the given term.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.