What I was looking for was transition_post_status. The documentation can be found here.
What I did was to add one more filter add_filter('transition_post_status','myFunction');
What I was looking for was transition_post_status. The documentation can be found here.
What I did was to add one more filter add_filter('transition_post_status','myFunction');