do_action( 'bp_before_directory_activity' );
do_action( 'bp_before_directory_activity_content' );
do_action( 'template_notices' );
$userIdd = bp_loggedin_user_id();
$sql = "SELECT leader_id, follower_id FROM wp_bp_follow WHERE follower_id=$userIdd OR leader_id = $userIdd";
$followers = $wpdb->get_col( $sql );
$friends_and_me = '&user_id=' . $followers;
$followers = array_unique($followers);
$followers[] = bp_loggedin_user_id();
$friends_and_me = implode( ',', (array) $followers );
$friends_and_me = '&user_id=' . $friends_and_me;
global $bp;
$bp->current_action = array('public');
if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $friends_and_me) ) :
while ( bp_activities() ) : bp_the_activity();
$activity_id = bp_get_activity_id();
if ( !empty( $activity_id ) ) {
$the_act_list .= $activity_id.',';
}
endwhile;
endif;
$bp->current_action = array('mentions');
if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $friends_and_me) ) :
while ( bp_activities() ) : bp_the_activity();
if ( !empty( bp_get_activity_id() ) ) {
$the_mention_act_list .= bp_get_activity_id().',';
}
endwhile;
endif;
$the_act_list = rtrim($the_act_list,',');
$the_mention_act_list = rtrim($the_mention_act_list,',');
$the_act_list = $the_act_list.','.$the_mention_act_list;
$activitlistttt = 'include='.$the_act_list.'&max=20';
if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . $activitlistttt) ) :
while ( bp_activities() ) : bp_the_activity();
locate_template( array( 'buddypress/activity/entry.php' ), true, false );
endwhile;
endif;
do_action( 'bp_after_directory_activity_list' );
do_action( 'bp_directory_activity_content' );
do_action( 'bp_after_directory_activity_content' );
do_action( 'bp_after_directory_activity' );
No comments:
Post a Comment