is_post_closed( boolean|integer $post_id = null )

Description #

Check if question is closed.

Parameters #

  • $post_id
    boolean | integer (Optional) question or answer ID. Default value: null

Changelog #

VersionDescription
2.0.0Introduced.

Source #

File: includes/theme.php

function is_post_closed( $post_id = null ) {
	if ( '1' === ap_get_post_field( 'closed', $post_id ) ) {
		return true;
	}
	return false;
}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment