title: WordPress: on submitting post check if post is updated
body: <p>In WordPress with the <code>publish_{post_type}</code> (<a href="http://codex.wordpress.org/Post_Status_Transitions" rel="nofollow">http://codex.wordpress.org/Post_Status_Transitions</a>) you can hook into the loop if a post with custom type is published. But <code>publish_{post_type}</code> is also triggers if a a post is updated. </p>
  
  <p>I am basically looking for a way to check the old and new status, within the <code>publish_post_type</code> hook. Does anyone have a nifty idea as to how to accomplish that?</p>
  
  <p>I am doing this:</p>
  
  <pre><code>function doStuff( $post_ID ) {
      // do stuff
      return $post_ID;
  }
  add_action( 'publish_ttplaned', 'doStuff' );
  </code></pre>
  
  <p>So basically I need to check the old and new status of the post within the fuction doStuff().</p>