Suppresses notice that  is not defined if there is no role.
Corrects check on post type for role form url.

Needs to actually check the post_type value on the passed $post object.