newpost() is caledl when a post is added. Code for this has been added to post_admin