delete_term_taxonomy
Action HookDescription
Fires immediately before a term taxonomy ID is deleted.Hook Information
File Location |
wp-includes/taxonomy.php
View on GitHub
|
Hook Type | Action |
Line Number | 2171 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$tt_id
|
Term taxonomy ID. |
Usage Examples
Basic Usage
<?php
// Hook into delete_term_taxonomy
add_action('delete_term_taxonomy', 'my_custom_function', 10, 1);
function my_custom_function($tt_id) {
// Your custom code here
}
Source Code Context
wp-includes/taxonomy.php:2171
- How this hook is used in WordPress core
<?php
2166 *
2167 * @since 2.9.0
2168 *
2169 * @param int $tt_id Term taxonomy ID.
2170 */
2171 do_action( 'delete_term_taxonomy', $tt_id );
2172
2173 $wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $tt_id ) );
2174
2175 /**
2176 * Fires immediately after a term taxonomy ID is deleted.
PHP Documentation
<?php
/**
* Fires immediately before a term taxonomy ID is deleted.
*
* @since 2.9.0
*
* @param int $tt_id Term taxonomy ID.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.