bp_nouveau_loop_is_grid()

Checks if the layout preferences is set to grid (2 or more columns).

Description

Return

(bool) True if loop is displayed in grid mod. False otherwise.

Source

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

function bp_nouveau_loop_is_grid() {
	$bp_nouveau = bp_nouveau();
	$component  = sanitize_key( bp_current_component() );

	return ! empty( $bp_nouveau->{$component}->loop_layout ) && $bp_nouveau->{$component}->loop_layout > 1;
}

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.