Advertisements

comments_open

Definition:
function comments_open( $post_id=NULL ) {}

Whether the current post is open for comments.

Parameters

  • int $post_id: An optional post ID to check instead of the current post.

Return values

returns:True if the comments are open

Defined filters

  • comments_open
    apply_filters( 'comments_open', $open, $post_id )

Source code

function comments_open( $post_id=NULL ) {



	$_post = get_post($post_id);



	$open = ( 'open' == $_post->comment_status );

	return apply_filters( 'comments_open', $open, $post_id );

}

649

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: