Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/06/2022 10:31:49 PM (20 months ago)
Author:
imath
Message:

Activity introduce 2 new parameters to BP_Activity_Activity::get()`

  • The user_id__in parameter makes it possible to retrieve activities for

a list of user IDs.

  • The user_id__not_in parameter makes it possible to exclude activity

posted by a list of user IDs from retrieved activities.

Props username_, slaFFik, boonebgorges

Fixes #4184

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-functions.php

    r13309 r13337  
    18481848            'date_query'        => false,        // Filter by date. See first parameter of WP_Date_Query for format.
    18491849            'filter_query'      => false,
     1850            'user_id__in'       => array(),      // Array of user ids to include.
     1851            'user_id__not_in'   => array(),      // Array of user ids to excluce.
    18501852            'show_hidden'       => false,        // Show activity items that are hidden site-wide?
    18511853            'exclude'           => false,        // Comma-separated list of activity IDs to exclude.
     
    18831885            'filter_query'      => $r['filter_query'],
    18841886            'filter'            => $r['filter'],
     1887            'user_id__in'       => $r['user_id__in'],
     1888            'user_id__not_in'   => $r['user_id__not_in'],
    18851889            'scope'             => $r['scope'],
    18861890            'display_comments'  => $r['display_comments'],
Note: See TracChangeset for help on using the changeset viewer.