Make WordPress Core

Ticket #48416: 48416.diff

File 48416.diff, 1.7 KB (added by dlh, 5 years ago)
  • src/wp-includes/taxonomy.php

    diff --git src/wp-includes/taxonomy.php src/wp-includes/taxonomy.php
    index 4631a534dd..2949821d73 100644
    function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    23962396         */
    23972397        do_action( "created_{$taxonomy}", $term_id, $tt_id );
    23982398
     2399        /**
     2400         * Fires after a term has been saved, and the term cache has been cleared.
     2401         *
     2402         * @since 5.x.0
     2403         *
     2404         * @param int    $term_id  Term ID.
     2405         * @param int    $tt_id    Term taxonomy ID.
     2406         * @param string $taxonomy Taxonomy slug.
     2407         * @param bool   $update   Whether this is an existing term being updated.
     2408         */
     2409        do_action( 'saved_term', $term_id, $tt_id, $taxonomy, false );
     2410
     2411        /**
     2412         * Fires after a term in a specific taxonomy has been saved, and the term
     2413         * cache has been cleared.
     2414         *
     2415         * The dynamic portion of the hook name, `$taxonomy`, refers to the taxonomy slug.
     2416         *
     2417         * @since 5.x.0
     2418         *
     2419         * @param int  $term_id Term ID.
     2420         * @param int  $tt_id   Term taxonomy ID.
     2421         * @param bool $update  Whether this is an existing term being updated.
     2422         */
     2423        do_action( "saved_{$taxonomy}", $term_id, $tt_id, false );
     2424
    23992425        return array(
    24002426                'term_id'          => $term_id,
    24012427                'term_taxonomy_id' => $tt_id,
    function wp_update_term( $term_id, $taxonomy, $args = array() ) { 
    30473073         */
    30483074        do_action( "edited_{$taxonomy}", $term_id, $tt_id );
    30493075
     3076        /** This action is documented in wp-includes/taxonomy.php */
     3077        do_action( 'saved_term', $term_id, $tt_id, $taxonomy, true );
     3078
     3079        /** This action is documented in wp-includes/taxonomy.php */
     3080        do_action( "saved_{$taxonomy}", $term_id, $tt_id, true );
     3081
    30503082        return array(
    30513083                'term_id'          => $term_id,
    30523084                'term_taxonomy_id' => $tt_id,