Skip to content

Commit

Permalink
Remove 'Recent Activity' section from member profile sidebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
boonebgorges committed Jun 24, 2024
1 parent 618196f commit c54cede
Showing 1 changed file with 0 additions and 65 deletions.
65 changes: 0 additions & 65 deletions buddypress/members/single/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,68 +22,3 @@
<?php openlab_member_sidebar_menu(); ?>

</div>

<?php /* End portfolio links */ ?>

<?php /* Recent Account Activity / Recent Friend Activity */ ?>

<?php
// The 'user_id' param is the displayed user, but displayed user is not set on
// my-* pages
$user_id = bp_is_user() ? bp_displayed_user_id() : bp_loggedin_user_id();

$activity_args = array(
'user_id' => $user_id,
'per_page' => openlab_is_my_profile() ? 4 : 2, // Legacy. Not sure why
'scope' => bp_is_user_friends() ? 'friends' : '',
'show_hidden' => openlab_is_my_profile(),
'primary_id' => false,
);
?>

<?php if ( bp_is_user_friends() ) : ?>
<h2 class="sidebar-header"><?php esc_html_e( 'Recent Friend Activity', 'commons-in-a-box' ); ?></h2>
<?php else : ?>
<h2 class="sidebar-header"><?php esc_html_e( 'Recent Activity', 'commons-in-a-box' ); ?></h2>
<?php endif ?>

<div class="activity-wrapper">
<?php if ( bp_has_activities( $activity_args ) ) : ?>
<div id="activity-stream" class="activity-list item-list inline-element-list sidebar-sublinks">
<?php
while ( bp_activities() ) :
bp_the_activity();
?>
<div class="sidebar-block activity-block">
<div class="row activity-row">
<div class="activity-avatar col-sm-8 col-xs-7">
<a href="<?php bp_activity_user_link(); ?>">
<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo openlab_activity_user_avatar(); ?>
</a>
</div>

<div class="activity-content overflow-hidden col-sm-16 col-xs-17">

<div class="activity-header">
<?php // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
<?php echo openlab_get_custom_activity_action(); ?>
</div>

</div>
</div>
</div>
<?php endwhile; ?>
</div>
<?php else : ?>
<div id="activity-stream" class="activity-list item-list">
<div class="sidebar-block">
<div class="row activity-row">
<div id="message" class="info col-sm-24">
<p><?php esc_html_e( 'No recent activity.', 'commons-in-a-box' ); ?></p>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>

0 comments on commit c54cede

Please sign in to comment.