get_default_comment_status хук-фильтр . WP 4.3.0
Filters the default comment status for the given post type.
Использование
add_filter( 'get_default_comment_status', 'filter_function_name_9782', 10, 3 ); function filter_function_name_9782( $status, $post_type, $comment_type ){ // filter... return $status; }
- $status(строка)
- Default status for the given post type, either 'open' or 'closed'.
- $post_type(строка)
- Post type.
По умолчанию:post
- $comment_type(строка)
- Type of comment.
По умолчанию:comment
Список изменений
С версии 4.3.0 | Введена. |
Где вызывается хук
get_default_comment_status
wp-includes/comment.php 308
return apply_filters( 'get_default_comment_status', $status, $post_type, $comment_type );