Make WordPress Core


Ignore:
Timestamp:
07/05/2020 11:11:46 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Taxonomy: Introduce saved_term and saved_{$taxonomy} actions to complement created_term and created_{$taxonomy}.

This allows for hooking into both the create and update events with a single callback, in the same way that is already possible for posts via the save_post and save_post_{$post->post_type} actions.

Props dlh.
Fixes #48416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r48310 r48314  
    42084208     * @param int     $post_ID Post ID.
    42094209     * @param WP_Post $post    Post object.
    4210      * @param bool    $update  Whether this is an existing post being updated or not.
     4210     * @param bool    $update  Whether this is an existing post being updated.
    42114211     */
    42124212    do_action( "save_post_{$post->post_type}", $post_ID, $post, $update );
     
    42194219     * @param int     $post_ID Post ID.
    42204220     * @param WP_Post $post    Post object.
    4221      * @param bool    $update  Whether this is an existing post being updated or not.
     4221     * @param bool    $update  Whether this is an existing post being updated.
    42224222     */
    42234223    do_action( 'save_post', $post_ID, $post, $update );
     
    42304230     * @param int     $post_ID Post ID.
    42314231     * @param WP_Post $post    Post object.
    4232      * @param bool    $update  Whether this is an existing post being updated or not.
     4232     * @param bool    $update  Whether this is an existing post being updated.
    42334233     */
    42344234    do_action( 'wp_insert_post', $post_ID, $post, $update );
Note: See TracChangeset for help on using the changeset viewer.