Plugin bug


My “tweetmypost” plugin had a bug where every time I edited the same post. It would tweet out as a new post. The problem itself lies with the hook “publish_post”. Publish post is triggered on new posts and updated posts.

The solution is to use 3 other hooks.


That way, you’ve covered all the possibility of a new post but ignoring the edit post trigger.

Leave a Reply

"Life is like a camera. Focus only on what is important and you will capture it perfectly."