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;
}
Related Posts:
- Why are the comments disabled by default on my custom_post_types?
- Why are comments and trackbacks still getting through for custom post types?
- Display Authors Comments on Profile Page
- List all posts commented by current user
- Custom Comment Types
- modify all posts of a category to “no comments allowed”
- Custom comment status possible?
- feed links for custom post type pages
- Seperating custom post type comments from regular blog posts comments
- Add comments meta fields to comments metabox on post edit screen
- Exclude post_type from admin comments_list
- Recent comments on author page?
- wp_query and comment_parent – select only posts with top level comments
- changing default comment form arguments [duplicate]
- Automatically check “Allow comments” for custom post type [duplicate]
- How could I create a ‘private comments’ section on a custom post type?
- Disable comments from showing up public for Custom Post Type
- Custom Post Type loops and Disqus
- “Allow Comments” box cannot be checked
- Separate comment section for post type in dashboard
- Count all comments of a custom post type
- custom comments on specific post type
- Insert data on comment post
- get_comments not working on custom post types
- Custom Post Type Set Comments ON by default without show METABOX
- WordPress comments_open for specific user role or post type
- Add custom field in comments form
- Create another comment system for CPT
- How can the recipients and content for comment email notifications on a custom post type be changed?
- Convert comments to Custom Post Type
- How to assign classes to all elements?
- custom comments form for custom post type
- What functions does WordPress use for filtering / sanitizing comments?
- comment_notification_text filter for custom post type
- get comments by current user inside page template
- User-submitted reviews of different custom post types
- Check if user has comment on current post
- Enable comments on custom page type – option not showing in “customize” for theme
- Allow anonymous comments just in a custom post type
- duplicate comment section functionality and call it something else for custom post types
- Send email messages after comment was submitted
- comments hooks on custom post type
- custom comment fields on CPT
- unapprove comments on custom post type
- Enable comments for post when comments meta box removed
- Get the latest comment from a custom post type where depth = 1?
- Why will comments not remain open on custom post types?
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- How to change the comments form title based on post type
- Comments on posts with new custom post type redirected to another post
- Display custom posts, ordered by most commented, without duplicates
- get comments for custom post type
- How to create a discussion post when a custom post is created?
- Adding second comments.php for reviews
- Custom post type updated to support comments, yet comments don’t appear
- Comments not enabled for custom post types
- Turn off comments for given CPT checkbox?
- Author profile comments system
- Custom post type: can’t enable comments by default
- Comment moderation with disqus comments
- add comments custom fields after user is logged in
- Comments are not working on Custom Post Type
- Error 403 when posting comments to a custom post type from a different page
- Comments not working (error not allowed) on posts with custom post status
- Change the edit page for a custom post type?
- Automatically create child pages when saving a (parent) page
- How to create user personal pages with information from their meta profile fields?
- where can I see my custom post type archive template?
- Bulk edit custom excerpt text in WordPress
- Connecting a taxonomy with a post type
- Allowing null vairiable
- Custom Post & Taxonomy rewrite break regular post & page
- Order Wp Query by earliest of 3 dates meta query
- cannot export data from CPT UI (books)
- Changing upload directory and migrating old attachments
- How to set the Screen Options for Users in the Admin Panel?
- Different CPT permalink base on taxonomy
- How do loop categories post from according in WordPress? is it impossible to solve this problem?
- REQUIRED: The theme uses the register_post_type() function, which is plugin-territory
- Where paramaters of a custom function are coming from inside the loop?
- When Attempting to Filter Plugin Generated Content Using Filter post_type_link, Permalinks Are Not Modified
- How to filter custom post data with AJAX?
- Post Meta for Custom Post Types
- WP 4.4 upgrade custom post type cannot add new
- Hide custom post type slug url from search engine [closed]
- Understanding capabilities parameter in register_post_type()
- display posts, pages and custom post types from another wordpress site
- Is it possible for post and custom post type to share a category base slug?
- Replace the custom post type permalink
- Query custom post type and group by taxonomy
- How to make posts under custom post type not generate a URL / post
- Can’t add custom post type archive page to menu
- How to develop Knowledge center in WordPress Website
- strange issue with get_post_type() when using it in a shortcode in text widget
- Create a WordPress loop that shows posts from a custom post type + filters the posts by taxonomies while hiding empty taxonomies
- How to change permalink structure off default posts and also CPT’s posts
- Add Custom Taxonomy Terms as CSS Classes for CPT Posts in an Elementor Loop Item Template
- Show content from pages based on Current Date
- Need help creating a WordPress site that has a landing page and sub pages for an area (for example, “London”). Website will have 100’s of areas
- Custom URLs between different post types, using “Pods”