Comment moderation on custom post types

Yes, this is possible. Comment moderation is an option, and is retrieved like any other option:

get_option('comment_moderation');

the get_option function applies a filter before returning the value…

return apply_filters( 'option_' . $option, maybe_unserialize( $value ) );

So what you’ll want to do is add_filter('option_comment_moderation', 'check_moderable_post_types') and in your check_moderable_post_types function, check to see if the current post’s post type is species. If so, return 1, and if not return the $value that is passed to the function!

Edit: This should do the trick:

add_filter('option_comment_moderation', 'check_moderable_post_types');
function check_moderable_post_types($value) {
    if (get_post_type() == 'species') return 1;
    return $value;
}

Leave a Comment