Fixes #163

Adding validation to make sure the hook is only executed in the posts.
Merge branch 'master' of github.com:magic-fields-team/Magic-Fields-2