Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/25/2022 07:33:13 PM (2 years ago)
Author:
imath
Message:

Improve the activity loop to be able to get items below a max. ID

The $filter parameter of this loop now includes a new $offset_lower
argument making it possible to only retrieve activities having an ID
lower than this argument provided value.

We are using this filter to avoid a possible activity duplicate when
clicking on the "Load More" link.

Closes https://github.com/buddypress/buddypress/pull/29
Fixes #4535

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/functions.php

    r13312 r13344  
    116116    if ( ! empty( $post_query['offset'] ) ) {
    117117        $qs[] = 'offset=' . intval( $post_query['offset'] );
     118    }
     119
     120    if ( ! empty( $post_query['offset_lower'] ) ) {
     121        $qs[] = 'offset_lower=' . intval( $post_query['offset_lower'] );
    118122    }
    119123
Note: See TracChangeset for help on using the changeset viewer.