Make WordPress Core

Ticket #38006: 38006.3.diff

File 38006.3.diff, 2.7 KB (added by Takahashi_Fumiki, 9 years ago)

Add since tag to inline document.

  • src/wp-includes/taxonomy.php

     
    25262526                 * Fires immediately before an object-term relationship is added.
    25272527                 *
    25282528                 * @since 2.9.0
     2529                 * @since 4.7.0 Added the `$taxonomy` parameter.
    25292530                 *
    2530                  * @param int $object_id Object ID.
    2531                  * @param int $tt_id     Term taxonomy ID.
     2531                 * @param int    $object_id Object ID.
     2532                 * @param int    $tt_id     Term taxonomy ID.
     2533                 * @param string $taxonomy  Taxonomy slug.
    25322534                 */
    2533                 do_action( 'add_term_relationship', $object_id, $tt_id );
     2535                do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy );
    25342536                $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) );
    25352537
    25362538                /**
     
    25372539                 * Fires immediately after an object-term relationship is added.
    25382540                 *
    25392541                 * @since 2.9.0
     2542                 * @since 4.7.0 Added the `$taxonomy` parameter.
    25402543                 *
    2541                  * @param int $object_id Object ID.
    2542                  * @param int $tt_id     Term taxonomy ID.
     2544                 * @param int    $object_id Object ID.
     2545                 * @param int    $tt_id     Term taxonomy ID.
     2546                 * @param string $taxonomy  Taxonomy slug.
    25432547                 */
    2544                 do_action( 'added_term_relationship', $object_id, $tt_id );
     2548                do_action( 'added_term_relationship', $object_id, $tt_id, $taxonomy );
    25452549                $new_tt_ids[] = $tt_id;
    25462550        }
    25472551
     
    26612665                 * Fires immediately before an object-term relationship is deleted.
    26622666                 *
    26632667                 * @since 2.9.0
     2668                 * @since 4.7.0 Added the `$taxonomy` parameter.
    26642669                 *
    26652670                 * @param int   $object_id Object ID.
    26662671                 * @param array $tt_ids    An array of term taxonomy IDs.
     2672                 * @param string $taxonomy  Taxonomy slug.
    26672673                 */
    2668                 do_action( 'delete_term_relationships', $object_id, $tt_ids );
     2674                do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy );
    26692675                $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) );
    26702676
    26712677                wp_cache_delete( $object_id, $taxonomy . '_relationships' );
     
    26742680                 * Fires immediately after an object-term relationship is deleted.
    26752681                 *
    26762682                 * @since 2.9.0
     2683                 * @since 4.7.0 Added the `$taxonomy` parameter.
    26772684                 *
    2678                  * @param int   $object_id Object ID.
    2679                  * @param array $tt_ids    An array of term taxonomy IDs.
     2685                 * @param int    $object_id Object ID.
     2686                 * @param array  $tt_ids    An array of term taxonomy IDs.
     2687                 * @param string $taxonomy  Taxonomy slug.
    26802688                 */
    2681                 do_action( 'deleted_term_relationships', $object_id, $tt_ids );
     2689                do_action( 'deleted_term_relationships', $object_id, $tt_ids, $taxonomy );
    26822690
    26832691                wp_update_term_count( $tt_ids, $taxonomy );
    26842692