close_comments_for_post_types WordPress Filter Hook

The close_comments_for_post_types hook is used to close comments for specific post types. This hook is useful for post types that do not support comments or for post types that are not meant to be commented on.

apply_filters( 'close_comments_for_post_types', string[] $post_types ) #

Filters the list of post types to automatically close comments for.


Parameters

$post_types

(string[])An array of post type names.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More