bp_document_has_more_items()

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

Description

Return

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

Source

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

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
function bp_document_has_more_items() {
    global $document_template;
 
    if ( ! empty( $document_template->has_more_items ) ) {
        $has_more_items = true;
    } else {
        $remaining_pages = 0;
 
        if ( ! empty( $document_template->pag_page ) ) {
            $remaining_pages = floor( ( $document_template->total_document_count - 1 ) / ( $document_template->pag_num * $document_template->pag_page ) );
        }
 
        $has_more_items = (int) $remaining_pages > 0;
    }
 
    /**
     * Filters whether there are more document items to display.
     *
     * @since BuddyBoss 1.4.0
     *
     * @param bool $has_more_items Whether or not there are more document items to display.
     */
    return apply_filters( 'bp_document_has_more_items', $has_more_items );
}

Changelog

Changelog
Version Description
BuddyBoss 1.4.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.