Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/07/2015 02:10:50 PM (9 years ago)
Author:
djpaul
Message:

Admin, Activity: fix missing comment count bubble on Activity admin screen.

Caused by a change in WordPress 4.3.

Fixes #6609, props r-a-y and imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/src/bp-activity/bp-activity-admin.php

    r10130 r10196  
    16021602    function column_response( $item ) {
    16031603        // Is $item is a root activity?
     1604        ?>
     1605
     1606        <div class="response-links">
     1607
     1608        <?php
     1609        // Activity permalink
     1610        $activity_permalink = '';
     1611        if ( ! $item['is_spam'] ) {
     1612            $activity_permalink = sprintf( __( '<a href="%1$s" class="comments-view-item-link">View Activity</a>', 'buddypress' ), bp_activity_get_permalink( $item['id'], (object) $item ) );
     1613        }
    16041614
    16051615        /**
     
    16121622         */
    16131623        if ( empty( $item['item_id'] ) || ! in_array( $item['type'], apply_filters( 'bp_activity_admin_root_activity_types', array( 'activity_comment' ), $item ) ) ) {
     1624            echo $activity_permalink;
     1625
    16141626            $comment_count     = !empty( $item['children'] ) ? bp_activity_recurse_comment_count( (object) $item ) : 0;
    16151627            $root_activity_url = bp_get_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
     
    16181630            if ( $comment_count ) {
    16191631                $title_attr = sprintf( _n( '%s related activity', '%s related activities', $comment_count, 'buddypress' ), number_format_i18n( $comment_count ) );
    1620                 printf( '<a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', esc_url( $root_activity_url ), esc_attr( $title_attr ), number_format_i18n( $comment_count ) );
     1632                printf( '<a href="%1$s" title="%2$s" class="post-com-count post-com-count-approved"><span class="comment-count comment-count-approved">%3$s</span></a>', esc_url( $root_activity_url ), esc_attr( $title_attr ), number_format_i18n( $comment_count ) );
    16211633            }
    16221634
     
    16241636        } else {
    16251637            echo '<strong>' . get_avatar( $this->get_activity_user_id( $item['item_id'] ), '32' ) . ' ' . bp_core_get_userlink( $this->get_activity_user_id( $item['item_id'] ) ) . '</strong><br />';
    1626         }
    1627 
    1628         // Activity permalink
    1629         if ( ! $item['is_spam'] )
    1630             printf( __( '<a href="%1$s">View Activity</a>', 'buddypress' ), bp_activity_get_permalink( $item['id'], (object) $item ) );
     1638            echo $activity_permalink;
     1639        }
     1640        ?>
     1641
     1642        </div>
     1643
     1644        <?php
    16311645    }
    16321646
Note: See TracChangeset for help on using the changeset viewer.