edit_term_taxonomy

edit_term_taxonomy

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

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('edit_term_taxonomy') is found 3 times:

  • /wp-includes/taxonomy.php line 3381
    3377
    3378
    3379
    3380
    3381
    3382
    3383
    3384
    3385
    3386
    3387
    * @param int    $tt_id    Term taxonomy ID.
     * @param string $taxonomy Taxonomy slug.
     * @param array  $args     Arguments passed to wp_update_term().
     */
    do_action( 'edit_term_taxonomy', $tt_id, $taxonomy, $args );
     
    $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) );
     
    /**
     * Fires immediately after a term-taxonomy relationship is updated.
     *
  • /wp-includes/taxonomy.php line 4176
    4172
    4173
    4174
    4175
    4176
    4177
    4178
    4179
    4180
    4181
    4182
                $count += (int) $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships, $wpdb->posts WHERE $wpdb->posts.ID = $wpdb->term_relationships.object_id AND post_status IN ('" . implode( "', '", $post_statuses ) . "') AND post_type IN ('" . implode( "', '", $object_types ) . "') AND term_taxonomy_id = %d", $term ) );
            }
     
            /** This action is documented in wp-includes/taxonomy.php */
            do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
            $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
     
            /** This action is documented in wp-includes/taxonomy.php */
            do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
        }
    }
  • /wp-includes/taxonomy.php line 4203
    4199
    4200
    4201
    4202
    4203
    4204
    4205
    4206
    4207
    4208
    4209
        foreach ( (array) $terms as $term ) {
            $count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM $wpdb->term_relationships WHERE term_taxonomy_id = %d", $term ) );
     
            /** This action is documented in wp-includes/taxonomy.php */
            do_action( 'edit_term_taxonomy', $term, $taxonomy->name );
            $wpdb->update( $wpdb->term_taxonomy, compact( 'count' ), array( 'term_taxonomy_id' => $term ) );
     
            /** This action is documented in wp-includes/taxonomy.php */
            do_action( 'edited_term_taxonomy', $term, $taxonomy->name );
        }
    }