bp_nouveau_loop_get_grid_columns()

Returns the number of columns of the layout preferences.

Description

Return

(int) The number of columns.

Source

File: bp-templates/bp-nouveau/includes/template-tags.php

675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
function bp_nouveau_loop_get_grid_columns() {
    $bp_nouveau = bp_nouveau();
    $component  = sanitize_key( bp_current_component() );
 
    $columns = 1;
 
    if ( ! empty( $bp_nouveau->{$component}->loop_layout ) ) {
        $columns = (int) $bp_nouveau->{$component}->loop_layout;
    }
 
    /**
     * Filter number of columns for this grid.
     *
     * @since BuddyPress 3.0.0
     *
     * @param int $columns The number of columns.
     */
    return (int) apply_filters( 'bp_nouveau_loop_get_grid_columns', $columns );
}

Changelog

Changelog
Version Description
BuddyPress 3.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.