Skip to:
Content

BuddyPress.org

Changeset 10197


Ignore:
Timestamp:
10/07/2015 02:12:26 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 for trunk, props r-a-y and imath

Location:
trunk/src/bp-activity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/admin/css/admin-rtl.css

    r10068 r10197  
    4545#bp-activities-form .column-response img {
    4646    float: right;
     47    margin-bottom: 5px;
    4748    margin-left: 10px;
    4849    margin-top: 1px;
  • trunk/src/bp-activity/admin/css/admin.css

    r10065 r10197  
    4545#bp-activities-form .column-response img {
    4646    float: left;
     47    margin-bottom: 5px;
    4748    margin-right: 10px;
    4849    margin-top: 1px;
  • trunk/src/bp-activity/bp-activity-admin.php

    r10131 r10197  
    16431643    function column_response( $item ) {
    16441644        // Is $item is a root activity?
     1645        ?>
     1646
     1647        <div class="response-links">
     1648
     1649        <?php
     1650        // Activity permalink
     1651        $activity_permalink = '';
     1652        if ( ! $item['is_spam'] ) {
     1653            $activity_permalink = sprintf( __( '<a href="%1$s" class="comments-view-item-link">View Activity</a>', 'buddypress' ), bp_activity_get_permalink( $item['id'], (object) $item ) );
     1654        }
    16451655
    16461656        /**
     
    16531663         */
    16541664        if ( empty( $item['item_id'] ) || ! in_array( $item['type'], apply_filters( 'bp_activity_admin_root_activity_types', array( 'activity_comment' ), $item ) ) ) {
     1665            echo $activity_permalink;
     1666
    16551667            $comment_count     = !empty( $item['children'] ) ? bp_activity_recurse_comment_count( (object) $item ) : 0;
    16561668            $root_activity_url = bp_get_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
     
    16591671            if ( $comment_count ) {
    16601672                $title_attr = sprintf( _n( '%s related activity', '%s related activities', $comment_count, 'buddypress' ), number_format_i18n( $comment_count ) );
    1661                 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 ) );
     1673                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 ) );
    16621674            }
    16631675
     
    16651677        } else {
    16661678            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 />';
    1667         }
    1668 
    1669         // Activity permalink
    1670         if ( ! $item['is_spam'] )
    1671             printf( __( '<a href="%1$s">View Activity</a>', 'buddypress' ), bp_activity_get_permalink( $item['id'], (object) $item ) );
     1679            echo $activity_permalink;
     1680        }
     1681        ?>
     1682
     1683        </div>
     1684
     1685        <?php
    16721686    }
    16731687
Note: See TracChangeset for help on using the changeset viewer.