Move post type support calls into a function