开发者

update facebook status on publish_post and not when post is updated in wordpress

I have created a wordpress plugin which updates my facebook status when a new post is publi开发者_开发技巧shed. But the problem is that it also updates my facebook status if I updates a post after editing it even though the post has already been published. How do I solve this issue.


Instead of running the trigger on publish_post, have it run on new_to_publish, draft_to_publish, and future_to_publish. Those three triggers run when a new post is added, when a draft post is published, and when a scheduled post is published.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜