don't allow non-post/page types to be submitted

There has been a regression which allows wordpress objects that are not post or page types (notably attachments), which this should fix