WPDev.one
Core Function
View Source on Trac ↗

comments_open()

comments_open( mixed $post = null )

Determines whether the current post is open for comments.

Parameters 1 required

Name / Type Description
(int

| WP_Post) $post Optional. Post ID or WP_Post object. Default current post.

Required

Return Value

(bool)
True if the comments are open.

Function Information

Since Version
1.5.0
Source File
wp-includes/comment-template.php
Advertisement