Changeset 13344 for trunk/src/bp-activity/bp-activity-template.php
- Timestamp:
- 10/25/2022 07:33:13 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r13326 r13344 273 273 'secondary_id' => false, // Secondary object ID to filter on e.g. a post_id. 274 274 'offset' => false, // Return only items >= this ID. 275 'offset_lower' => false, // Return only items < this ID. 275 276 'since' => false, // Return only items recorded since this Y-m-d H:i:s date. 276 277 … … 327 328 'object' => $_GET['afilter'] 328 329 ); 329 } elseif ( ! empty( $r['user_id'] ) || ! empty( $r['object'] ) || ! empty( $r['action'] ) || ! empty( $r['primary_id'] ) || ! empty( $r['secondary_id'] ) || ! empty( $r['offset'] ) || ! empty( $r[' since'] ) ) {330 } elseif ( ! empty( $r['user_id'] ) || ! empty( $r['object'] ) || ! empty( $r['action'] ) || ! empty( $r['primary_id'] ) || ! empty( $r['secondary_id'] ) || ! empty( $r['offset'] ) || ! empty( $r['offset_lower'] ) || ! empty( $r['since'] ) ) { 330 331 $r['filter'] = array( 331 332 'user_id' => $r['user_id'], … … 335 336 'secondary_id' => $r['secondary_id'], 336 337 'offset' => $r['offset'], 338 'offset_lower' => $r['offset_lower'], 337 339 'since' => $r['since'] 338 340 ); … … 411 413 global $activities_template; 412 414 413 $url = bp_get_requested_url(); 414 $link = add_query_arg( $activities_template->pag_arg, $activities_template->pag_page + 1, $url ); 415 $url = bp_get_requested_url(); 416 $load_more_args = array( 417 $activities_template->pag_arg => $activities_template->pag_page + 1, 418 ); 419 420 // Try to include the offset arg. 421 $last_displayed_activity = reset( $activities_template->activities ); 422 if ( isset( $last_displayed_activity->id ) && $last_displayed_activity->id ) { 423 $load_more_args['offset_lower'] = (int) $last_displayed_activity->id; 424 } 425 426 $link = add_query_arg( $load_more_args, $url ); 415 427 416 428 /**
Note: See TracChangeset
for help on using the changeset viewer.