deleted_term_taxonomy

deleted_term_taxonomy

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('deleted_term_taxonomy') is found 1 times:

  • /wp-includes/taxonomy.php line 2171
    2167
    2168
    2169
    2170
    2171
    2172
    2173
    2174
    2175
    2176
    * @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 ) );
    }