get_default_comment_status filter-hook . WP 4.3.0
Filters the default comment status for the given post type.
Usage
add_filter( 'get_default_comment_status', 'filter_function_name_2108', 10, 3 ); function filter_function_name_2108( $status, $post_type, $comment_type ){ // filter... return $status; }
- $status(string)
- Default status for the given post type, either 'open' or 'closed'.
- $post_type(string)
- Post type.
Default: post - $comment_type(string)
- Type of comment.
Default: comment
Changelog
Since 4.3.0 | Introduced. |
Where the hook is called
get_default_comment_status
wp-includes/comment.php 309
return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );