Make WordPress Core

Ticket #60187: taxonomy.php.diff

File taxonomy.php.diff, 761 bytes (added by dartiss, 10 months ago)
  • wp-includes/taxonomy.php

    diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
    index 59ec5345fe0c..eaadaad65c4a 100644
    a b function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    25732573        $tt_id = (int) $wpdb->insert_id;
    25742574
    25752575        /*
    2576          * Sanity check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
     2576         * Confidence check: if we just created a term with the same parent + taxonomy + slug but a higher term_id than
    25772577         * an existing term, then we have unwittingly created a duplicate term. Delete the dupe, and use the term_id
    25782578         * and term_taxonomy_id of the older term instead. Then return out of the function so that the "create" hooks
    25792579         * are not fired.