Missed "self" context from pull request

Fix for
Fatal error: Call to undefined function is_custom_post_type()