bp_album_has_more_items()

Return true when there are more album items to be shown than currently appear.

Description

Return

(bool) $has_more_items True if more items, false if not.

Source

File: bp-media/bp-media-template.php

1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
function bp_album_has_more_items() {
    global $media_album_template;
 
    if ( ! empty( $media_album_template->has_more_items )  ) {
        $has_more_items = true;
    } else {
        $remaining_pages = 0;
 
        if ( ! empty( $media_album_template->pag_page ) ) {
            $remaining_pages = floor( ( $media_album_template->total_album_count - 1 ) / ( $media_album_template->pag_num * $media_album_template->pag_page ) );
        }
 
        $has_more_items = (int) $remaining_pages > 0;
    }
 
    /**
     * Filters whether there are more album items to display.
     *
     * @since BuddyBoss 1.0.0
     *
     * @param bool $has_more_items Whether or not there are more album items to display.
     */
    return apply_filters( 'bp_album_has_more_items', $has_more_items );
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.