Ticket #55441: 55441.diff
| File 55441.diff, 7.9 KB (added by , 4 years ago) |
|---|
-
src/wp-includes/taxonomy.php
2331 2331 * 2332 2332 * @param string|WP_Error $term The term name to add, or a WP_Error object if there's an error. 2333 2333 * @param string $taxonomy Taxonomy slug. 2334 * @param array $args Term arguments passed to the function. 2334 2335 */ 2335 $term = apply_filters( 'pre_insert_term', $term, $taxonomy );2336 $term = apply_filters( 'pre_insert_term', $term, $taxonomy, $args ); 2336 2337 2337 2338 if ( is_wp_error( $term ) ) { 2338 2339 return $term; … … 2560 2561 * @param int $term_id Term ID. 2561 2562 * @param int $tt_id Term taxonomy ID. 2562 2563 * @param string $taxonomy Taxonomy slug. 2564 * @param array $args Term arguments passed to the function. 2563 2565 */ 2564 do_action( 'create_term', $term_id, $tt_id, $taxonomy );2566 do_action( 'create_term', $term_id, $tt_id, $taxonomy, $args ); 2565 2567 2566 2568 /** 2567 2569 * Fires after a new term is created for a specific taxonomy. … … 2576 2578 * 2577 2579 * @since 2.3.0 2578 2580 * 2579 * @param int $term_id Term ID. 2580 * @param int $tt_id Term taxonomy ID. 2581 * @param int $term_id Term ID. 2582 * @param int $tt_id Term taxonomy ID. 2583 * @param array $args Term arguments passed to the function. 2581 2584 */ 2582 do_action( "create_{$taxonomy}", $term_id, $tt_id );2585 do_action( "create_{$taxonomy}", $term_id, $tt_id, $args ); 2583 2586 2584 2587 /** 2585 2588 * Filters the term ID after a new term is created. … … 2586 2589 * 2587 2590 * @since 2.3.0 2588 2591 * 2589 * @param int $term_id Term ID. 2590 * @param int $tt_id Term taxonomy ID. 2592 * @param int $term_id Term ID. 2593 * @param int $tt_id Term taxonomy ID. 2594 * @param array $args Term arguments passed to the function. 2591 2595 */ 2592 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );2596 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id, $args ); 2593 2597 2594 2598 clean_term_cache( $term_id, $taxonomy ); 2595 2599 … … 2604 2608 * @param int $term_id Term ID. 2605 2609 * @param int $tt_id Term taxonomy ID. 2606 2610 * @param string $taxonomy Taxonomy slug. 2611 * @param array $args Term arguments passed to the function. 2607 2612 */ 2608 do_action( 'created_term', $term_id, $tt_id, $taxonomy );2613 do_action( 'created_term', $term_id, $tt_id, $taxonomy, $args ); 2609 2614 2610 2615 /** 2611 2616 * Fires after a new term in a specific taxonomy is created, and after the term … … 2620 2625 * 2621 2626 * @since 2.3.0 2622 2627 * 2623 * @param int $term_id Term ID. 2624 * @param int $tt_id Term taxonomy ID. 2628 * @param int $term_id Term ID. 2629 * @param int $tt_id Term taxonomy ID. 2630 * @param array $args Term arguments passed to the function. 2625 2631 */ 2626 do_action( "created_{$taxonomy}", $term_id, $tt_id );2632 do_action( "created_{$taxonomy}", $term_id, $tt_id, $args ); 2627 2633 2628 2634 /** 2629 2635 * Fires after a term has been saved, and the term cache has been cleared. … … 2637 2643 * @param int $tt_id Term taxonomy ID. 2638 2644 * @param string $taxonomy Taxonomy slug. 2639 2645 * @param bool $update Whether this is an existing term being updated. 2646 * @param array $args Term arguments passed to the function. 2640 2647 */ 2641 do_action( 'saved_term', $term_id, $tt_id, $taxonomy, false );2648 do_action( 'saved_term', $term_id, $tt_id, $taxonomy, false, $args ); 2642 2649 2643 2650 /** 2644 2651 * Fires after a term in a specific taxonomy has been saved, and the term … … 2653 2660 * 2654 2661 * @since 5.5.0 2655 2662 * 2656 * @param int $term_id Term ID. 2657 * @param int $tt_id Term taxonomy ID. 2658 * @param bool $update Whether this is an existing term being updated. 2663 * @param int $term_id Term ID. 2664 * @param int $tt_id Term taxonomy ID. 2665 * @param bool $update Whether this is an existing term being updated. 2666 * @param array $args Term arguments passed to the function. 2659 2667 */ 2660 do_action( "saved_{$taxonomy}", $term_id, $tt_id, false );2668 do_action( "saved_{$taxonomy}", $term_id, $tt_id, false, $args ); 2661 2669 2662 2670 return array( 2663 2671 'term_id' => $term_id, … … 3219 3227 * 3220 3228 * @param int $term_id Term ID. 3221 3229 * @param string $taxonomy Taxonomy slug. 3230 * @param array $args Arguments passed to wp_update_term(). 3222 3231 */ 3223 do_action( 'edit_terms', $term_id, $taxonomy );3232 do_action( 'edit_terms', $term_id, $taxonomy, $args ); 3224 3233 3225 3234 $data = compact( 'name', 'slug', 'term_group' ); 3226 3235 … … 3251 3260 * 3252 3261 * @param int $term_id Term ID. 3253 3262 * @param string $taxonomy Taxonomy slug. 3263 * @param array $args Arguments passed to wp_update_term(). 3254 3264 */ 3255 do_action( 'edited_terms', $term_id, $taxonomy );3265 do_action( 'edited_terms', $term_id, $taxonomy, $args ); 3256 3266 3257 3267 /** 3258 3268 * Fires immediate before a term-taxonomy relationship is updated. … … 3261 3271 * 3262 3272 * @param int $tt_id Term taxonomy ID. 3263 3273 * @param string $taxonomy Taxonomy slug. 3274 * @param array $args Arguments passed to wp_update_term(). 3264 3275 */ 3265 do_action( 'edit_term_taxonomy', $tt_id, $taxonomy );3276 do_action( 'edit_term_taxonomy', $tt_id, $taxonomy, $args ); 3266 3277 3267 3278 $wpdb->update( $wpdb->term_taxonomy, compact( 'term_id', 'taxonomy', 'description', 'parent' ), array( 'term_taxonomy_id' => $tt_id ) ); 3268 3279 … … 3273 3284 * 3274 3285 * @param int $tt_id Term taxonomy ID. 3275 3286 * @param string $taxonomy Taxonomy slug. 3287 * @param array $args Arguments passed to wp_update_term(). 3276 3288 */ 3277 do_action( 'edited_term_taxonomy', $tt_id, $taxonomy );3289 do_action( 'edited_term_taxonomy', $tt_id, $taxonomy, $args ); 3278 3290 3279 3291 /** 3280 3292 * Fires after a term has been updated, but before the term cache has been cleaned. … … 3287 3299 * @param int $term_id Term ID. 3288 3300 * @param int $tt_id Term taxonomy ID. 3289 3301 * @param string $taxonomy Taxonomy slug. 3302 * @param array $args Arguments passed to wp_update_term(). 3290 3303 */ 3291 do_action( 'edit_term', $term_id, $tt_id, $taxonomy );3304 do_action( 'edit_term', $term_id, $tt_id, $taxonomy, $args ); 3292 3305 3293 3306 /** 3294 3307 * Fires after a term in a specific taxonomy has been updated, but before the term … … 3303 3316 * 3304 3317 * @since 2.3.0 3305 3318 * 3306 * @param int $term_id Term ID. 3307 * @param int $tt_id Term taxonomy ID. 3319 * @param int $term_id Term ID. 3320 * @param int $tt_id Term taxonomy ID. 3321 * @param array $args Arguments passed to wp_update_term(). 3308 3322 */ 3309 do_action( "edit_{$taxonomy}", $term_id, $tt_id );3323 do_action( "edit_{$taxonomy}", $term_id, $tt_id, $args ); 3310 3324 3311 3325 /** This filter is documented in wp-includes/taxonomy.php */ 3312 3326 $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id ); … … 3324 3338 * @param int $term_id Term ID. 3325 3339 * @param int $tt_id Term taxonomy ID. 3326 3340 * @param string $taxonomy Taxonomy slug. 3341 * @param array $args Arguments passed to wp_update_term(). 3327 3342 */ 3328 do_action( 'edited_term', $term_id, $tt_id, $taxonomy );3343 do_action( 'edited_term', $term_id, $tt_id, $taxonomy, $args ); 3329 3344 3330 3345 /** 3331 3346 * Fires after a term for a specific taxonomy has been updated, and the term … … 3340 3355 * 3341 3356 * @since 2.3.0 3342 3357 * 3343 * @param int $term_id Term ID. 3344 * @param int $tt_id Term taxonomy ID. 3358 * @param int $term_id Term ID. 3359 * @param int $tt_id Term taxonomy ID. 3360 * @param array $args Arguments passed to wp_update_term(). 3345 3361 */ 3346 do_action( "edited_{$taxonomy}", $term_id, $tt_id );3362 do_action( "edited_{$taxonomy}", $term_id, $tt_id, $args ); 3347 3363 3348 3364 /** This action is documented in wp-includes/taxonomy.php */ 3349 do_action( 'saved_term', $term_id, $tt_id, $taxonomy, true );3365 do_action( 'saved_term', $term_id, $tt_id, $taxonomy, true, $args ); 3350 3366 3351 3367 /** This action is documented in wp-includes/taxonomy.php */ 3352 do_action( "saved_{$taxonomy}", $term_id, $tt_id, true );3368 do_action( "saved_{$taxonomy}", $term_id, $tt_id, true, $args ); 3353 3369 3354 3370 return array( 3355 3371 'term_id' => $term_id,
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)