Stops relying on global $post var when doing save_post

Instead, the $post object is passed as an argument to the callback.
Merge branch 'hotfix' into development