deleted_term_taxonomy

deleted_term_taxonomy

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: wordpress-6.6

do_action('deleted_term_taxonomy') is found 1 times:

  • /wp-includes/taxonomy.php line 2170
    	 * @since 2.9.0
    	 *
    	 * @param int $tt_id Term taxonomy ID.
    	 */
    	do_action( 'deleted_term_taxonomy', $tt_id );
    
    	// Delete the term if no taxonomies use it.
    	if ( ! $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_taxonomy WHERE term_id = %d", $term ) ) ) {
    		$wpdb->delete( $wpdb->terms, array( 'term_id' => $term ) );
    	}