Changeset 38621
- Timestamp:
- 09/18/2016 06:52:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r38484 r38621 2527 2527 * 2528 2528 * @since 2.9.0 2529 * @since 4.7.0 Added the `$taxonomy` parameter. 2529 2530 * 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. 2532 2534 */ 2533 do_action( 'add_term_relationship', $object_id, $tt_id );2535 do_action( 'add_term_relationship', $object_id, $tt_id, $taxonomy ); 2534 2536 $wpdb->insert( $wpdb->term_relationships, array( 'object_id' => $object_id, 'term_taxonomy_id' => $tt_id ) ); 2535 2537 … … 2538 2540 * 2539 2541 * @since 2.9.0 2542 * @since 4.7.0 Added the `$taxonomy` parameter. 2540 2543 * 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. 2543 2547 */ 2544 do_action( 'added_term_relationship', $object_id, $tt_id );2548 do_action( 'added_term_relationship', $object_id, $tt_id, $taxonomy ); 2545 2549 $new_tt_ids[] = $tt_id; 2546 2550 } … … 2662 2666 * 2663 2667 * @since 2.9.0 2668 * @since 4.7.0 Added the `$taxonomy` parameter. 2664 2669 * 2665 2670 * @param int $object_id Object ID. 2666 2671 * @param array $tt_ids An array of term taxonomy IDs. 2672 * @param string $taxonomy Taxonomy slug. 2667 2673 */ 2668 do_action( 'delete_term_relationships', $object_id, $tt_ids );2674 do_action( 'delete_term_relationships', $object_id, $tt_ids, $taxonomy ); 2669 2675 $deleted = $wpdb->query( $wpdb->prepare( "DELETE FROM $wpdb->term_relationships WHERE object_id = %d AND term_taxonomy_id IN ($in_tt_ids)", $object_id ) ); 2670 2676 … … 2675 2681 * 2676 2682 * @since 2.9.0 2683 * @since 4.7.0 Added the `$taxonomy` parameter. 2677 2684 * 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. 2680 2688 */ 2681 do_action( 'deleted_term_relationships', $object_id, $tt_ids );2689 do_action( 'deleted_term_relationships', $object_id, $tt_ids, $taxonomy ); 2682 2690 2683 2691 wp_update_term_count( $tt_ids, $taxonomy );
Note: See TracChangeset
for help on using the changeset viewer.