edit_term_taxonomy

edit_term_taxonomy

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

See hook in core

Displaying hooks found in version: wordpress-6.5.5

do_action('edit_term_taxonomy') is found 3 times:

  • /wp-includes/taxonomy.php line 3375
    	 * @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 4170
    			$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 4197
    	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 );
    	}
    }