[wp-trac] [WordPress Trac] #21450: wp_insert_new_post hook
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 2 12:15:03 UTC 2012
#21450: wp_insert_new_post hook
-----------------------------+------------------------------
Reporter: rndbit | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: minor | Resolution:
Keywords: has-patch |
-----------------------------+------------------------------
Comment (by SergeyBiryukov):
> There is no hook that would be exectued only when post is created
You could use `transition_post_status` action and check if `$old_status`
is `new`:
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-
includes/post.php#L2997
http://codex.wordpress.org/Post_Status_Transitions
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21450#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list