Check we're on the correct post type before editing columns

Closes #6991
destroy the global!
Merge pull request #6992 from bryceadams/patch-6991

Check we're on the correct post type before editing columns