do_action( "save_post_{$post->post_type}", int $post_ID , WP_Post $post , bool $update )
Fires once a post has been saved.
Description Description
The dynamic portion of the hook name, $post->post_type
, refers to the post type slug.
Parameters Parameters
- $post_ID
-
(int) Post ID.
- $post
-
(WP_Post) Post object.
- $update
-
(bool) Whether this is an existing post being updated or not.
Source Source
File: wp-includes/post.php
Changelog Changelog
Version | Description |
---|---|
3.7.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
The hook also fires when clicking on the “Add New” option for the custom post type, as it creates the draft in the DB, and when calling the
wp_update_post
function as well.