do_action( 'save_post', int $post_ID , WP_Post $post , bool $update )
Fires once a post has been saved.
Description Description
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 |
---|---|
1.5.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
When using WordPress 3.7 or later, it’s a good idea to use the save_post_{$post->post_type} hook when it makes sense to in order to reduce code and fire less hooks overall when posts are created and updated.
Documentation can be found here: https://developer.wordpress.org/reference/hooks/save_post_post-post_type/
Force a new post of have specific category term,
Expand full source codeCollapse full source code