Skip to:
Content

BuddyPress.org

Ticket #8604: 8604.patch

File 8604.patch, 1.4 KB (added by imath, 3 years ago)
  • src/bp-activity/bp-activity-template.php

    diff --git src/bp-activity/bp-activity-template.php src/bp-activity/bp-activity-template.php
    index 52f074202..fef750a96 100644
    function bp_activity_has_content() { 
    14591459                        $generated_content = new stdClass();
    14601460                        $activity          = $activities_template->activity;
    14611461                        $user_id           = $activity->user_id;
     1462                        $personal_types    = array( 'new_avatar', 'new_member', 'updated_profile' );
     1463
     1464                        // Do not use generated-content activities when displaying a personal activity stream.
     1465                        if ( (int) $user_id === (int) bp_displayed_user_id() && in_array( $activity_type, $personal_types, true ) ) {
     1466                                return false;
     1467                        }
    14621468
    14631469                        // Set generated content properties.
    14641470                        if ( 'new_avatar' === $activity_type ) {
    function bp_activity_has_content() { 
    15461552                        }
    15471553
    15481554                        if ( 'created_group' === $activity_type || 'joined_group' === $activity_type ) {
    1549                                 $group = bp_get_group( $activity->item_id );
     1555                                $group         = bp_get_group( $activity->item_id );
     1556                                $current_group = groups_get_current_group();
     1557
     1558                                // Do not use generated-content activities when displaying a group activity stream.
     1559                                if ( (int) $group->id === (int) $current_group->id ) {
     1560                                        return false;
     1561                                }
    15501562
    15511563                                if ( isset( $bp->avatar->show_avatars ) && $bp->avatar->show_avatars && ! bp_disable_group_avatar_uploads() ) {
    15521564                                        $generated_content->group_profile_photo = array(