bp_groupblog_activity_can_comment

See if users are able to comment to the activity entry of the groupblog post.

Description

bp_groupblog_activity_can_comment( $retval ); 

Parameters (1)

0. $retval
The retval.

Usage

  1. if ( !function_exists( 'bp_groupblog_activity_can_comment' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-groupblog/bp-groupblog.php'; 
  3.  
  4. // The retval. 
  5. $retval = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_groupblog_activity_can_comment($retval); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-groupblog.php  
  1. function bp_groupblog_activity_can_comment( $retval ) { 
  2. if ( bp_get_activity_action_name() != 'new_groupblog_post' ) { 
  3. return $retval; 
  4.  
  5. global $bp; 
  6.  
  7. // get activity reply setting for blog posts 
  8. $cannot_blog_comment = isset( $bp->site_options['bp-disable-blogforum-comments'] ) ? $bp->site_options['bp-disable-blogforum-comments'] : false; 
  9.  
  10. if ( $cannot_blog_comment ) { 
  11. return false; 
  12. } else { 
  13. return $retval;