- Read the Codex,
- Look at the function in the core file,
-
Modify your code as follows:
function myFunc( $post ) { $postID = $post->ID; }
The post transistion does not send the post ID, it sends the complete post object. Sometimes a simple die(var_dump($postID));
(or whatever you use as parameter) helps to find out what will be send to the callback. If you don’t know how many parameters are send to the callback, put a die(var_dump(func_get_args()));
at the first line of your callback.