<?php if (bpgr_is_group_reviews()) { $per_page = 15; $max = false; } else { $per_page = 8; $max = 8; } ?> <?php if (bp_has_activities('action=review&per_page=' . $per_page . '&max=' . $max)) { ?> <?php if (bpgr_is_group_reviews()) { ?> <div class="pagination no-ajax"> <div class="pag-count"><?php echo str_replace('item', 'review', bp_get_activity_pagination_count()); ?> </div> <div class="pagination-links"><?php bp_activity_pagination_links(); ?> </div> </div> <?php } ?>
<?php } ?> <?php do_action('bp_activity_entry_meta'); ?> </div> </div> <?php do_action('bp_before_activity_entry_comments'); ?> <?php if (bp_activity_can_comment() && bpgr_is_group_reviews()) { ?> <div class="activity-comments"> <?php bp_activity_comments(); ?> <?php if (is_user_logged_in()) { ?> <form action="<?php bp_activity_comment_form_action(); ?> " method="post" id="ac-form-<?php bp_activity_id(); ?>
/** * On the BPGR tab, we show the rating markup separately, so we must strip it from the * activity content. * * @package BP Group Reviews * @since 1.3 * * @param str $content The content of the activity item * @return str $content The content, perhaps sans étoiles */ function strip_star_tags($content) { if (bpgr_is_group_reviews()) { $content = preg_replace('/<span class="p\\-rating">.*<\\/span><\\/span>/', '', $content); } return $content; }