Function returns different value when called from ‘save_post’ than when called on page load

Probably revisions. Check $post->post_type.

Leave a Comment