Opened 9 years ago
Closed 9 years ago
#26862 closed defect (bug) (invalid)
WordPress fires wp_insert_action on every single save and not just when the post is created
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
According to the WP Codex wp_insert_post as an action should fire ONLY when a new post is created. However it seems as if it fires on EVERY save.
See the following stack exchange article:
Change History (1)
Note: See
TracTickets for help on using
tickets.
wp_insert_post
will be fired on every time a post object is added to the DB, be this from a audit / logging plugin, or from the saving process of WordPress.Autosaves and revisions will also insert posts, which is probably what you're seeing here.
Some documentation to check out:
http://codex.wordpress.org/Plugin_API/Action_Reference/wp_insert_post
http://codex.wordpress.org/Plugin_API/Action_Reference/save_post (especially the examples)
If that still doesn't help you, please try the Support Forums for support: http://wordpress.org/support/