Plugin Development – Functions or Hooks?
Below I’ve included two hooks you could use. There may be better hooks depending on what you’re trying to accomplish exactly but this is what you’ve asked for. At the bottom I’ve listed some helpful resources: Publish Post Hook http://codex.wordpress.org/Plugin_API/Action_Reference/publish_post function published_post( $ID, $post ) { if( $post->post_type == ‘post’ ) { … } if( … Read more