Jump to content

Wordpress transition action


ckrudelux

Recommended Posts

Trying to add a function then post is published I got it to work with "draft_to_publish" but "new_to_publish" won't or I just don't trigger it.. If I post a new post waiting for it to save a draft before I publish it works but if I publish right away it don't. This is there I thought "new_to_publish" would trigger..

function fc_sharePost($post){print_r($post);echo 'success'; exit;} add_action('new_to_publish', 'fc_sharePost');add_action('draft_to_publish', 'fc_sharePost');add_action('pending_to_publish', 'fc_sharePost');

http://codex.wordpress.org/Post_Status_Transitions

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...