mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-14 09:34:41 +00:00
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@48314 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4207,7 +4207,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
*
|
||||
* @param int $post_ID Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param bool $update Whether this is an existing post being updated or not.
|
||||
* @param bool $update Whether this is an existing post being updated.
|
||||
*/
|
||||
do_action( "save_post_{$post->post_type}", $post_ID, $post, $update );
|
||||
|
||||
@@ -4218,7 +4218,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
*
|
||||
* @param int $post_ID Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param bool $update Whether this is an existing post being updated or not.
|
||||
* @param bool $update Whether this is an existing post being updated.
|
||||
*/
|
||||
do_action( 'save_post', $post_ID, $post, $update );
|
||||
|
||||
@@ -4229,7 +4229,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
*
|
||||
* @param int $post_ID Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param bool $update Whether this is an existing post being updated or not.
|
||||
* @param bool $update Whether this is an existing post being updated.
|
||||
*/
|
||||
do_action( 'wp_insert_post', $post_ID, $post, $update );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user