Skip to content

Commit

Permalink
Pinking shears.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Apr 24, 2017
1 parent c2d2866 commit f9445bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions includes/hooks-buddypress-group.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ public function display( $group_id = null ) {
'post_type' => 'cacsp_paper',
'post_status' => 'publish',
'bp_group' => $group_id,
'paged' => get_query_var( 'paged' ) >= 1 ? get_query_var( 'paged' ) : 1,
'paged' => get_query_var( 'paged' ) >= 1 ? get_query_var( 'paged' ) : 1,
's' => $search_query,
) );
?>
<div class="entry-content">

<?php if ( $group_query->have_posts() ) :
$num_papers = $group_query->found_posts;

// Only need total counts, description, new paper button on non-search group paper directories
if ( !cacsp_is_search() ) {
$group_paper_comment_count = wp_cache_get( $group_id, 'cacsp_group_paper_comment_counts' );
Expand All @@ -82,7 +82,7 @@ public function display( $group_id = null ) {
foreach( $group_query_not_paged->posts as $paper ) {
$group_paper_comment_count += $paper->comment_count;
}
wp_cache_set( $group_id, $group_paper_comment_count, 'cacsp_group_paper_comment_counts' );
wp_cache_set( $group_id, $group_paper_comment_count, 'cacsp_group_paper_comment_counts' );
}
$comments_text = sprintf( _n( '%s comment', '%s comments', $group_paper_comment_count, 'social-paper' ), $group_paper_comment_count );
$papers_text = sprintf( _n( '%s paper', '%s papers', $num_papers, 'social-paper' ), $num_papers );
Expand Down Expand Up @@ -136,7 +136,7 @@ public function display( $group_id = null ) {
</div>

<?php cacsp_get_template_part( 'search-social-paper', 'buddypress' ); ?>

<ul class="item-list">

<?php while ( $group_query->have_posts() ) : $group_query->the_post(); ?>
Expand Down Expand Up @@ -185,7 +185,7 @@ function cacsp_invalidate_group_paper_comment_count_cache( $comment_id ) {
if ( ! is_array( $group_ids ) ) {
return;
}

foreach( $group_ids as $group_id ) {
wp_cache_delete( $group_id, 'cacsp_group_paper_comment_counts' );
}
Expand Down

0 comments on commit f9445bf

Please sign in to comment.