Function Reference: geodir_check_reviews_open
Summary
Check whether the current post is open for reviews.
Parameters
- $open
- (bool) (required) Whether the current post is open for reviews.
- Default: None
- $post_id
- (int) (required) The post ID.
- Default: None
Return Values
- (bool)
- True if allowed otherwise False.
Change Log
Since: 1.6.22
Source File
geodir_check_reviews_open() is located in geodirectory-functions/comments_functions.php [Line: 1079]
Source Code
function geodir_check_reviews_open( $open, $post_id ) { if ( $open && $post_id && geodir_is_page( 'detail' ) ) { if ( in_array( get_post_status( $post_id ), array( 'draft', 'pending', 'auto-draft', 'trash' ) ) ) { $open = false; } } return $open; }