I was facing an issue (a custom metabox not saving), and after 2 hours I finally realised that, if you try to add an action to the save_post hook inside an if statement checking whether $_GET['post'] is set, it won't work.
Basically, even if $_GET['post'] is set, if you put this code in your functions.php, it won't work:
function foo() {
die('Saving post');
}
if( isset($_GET['post']) ) {
add_action( 'save_post', 'foo' );
}
I tried to reproduce this with other hooks, but save_post seems to be the only one that behaves like this.
I wonder why this happens?