function is_valid_sync_post_type($postid = null) { // is_single() etc. is not reliable $allowed_post_types = $this->get_allowed_post_types(); $current_post_type = get_post_type($postid); return in_array($current_post_type, $allowed_post_types); }