Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #21450, comment 1


Ignore:
Timestamp:
08/02/2012 12:15:32 PM (13 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21450, comment 1

    initial v1  
    11> There is no hook that would be exectued only when post is created
    22
    3 You could use `transition_post_status` action and check if `$old_status` is `new`:
     3You could use `transition_post_status` action and check if `$old_status` is `'new'`:
    44http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/post.php#L2997
    55http://codex.wordpress.org/Post_Status_Transitions