bp_nouveau_get_single_item_nav_classes()
Returns the single item nav container classes
Description
Return
(string) CSS classes
Source
File: bp-templates/bp-nouveau/includes/template-tags.php
function bp_nouveau_get_single_item_nav_classes() { $classes = array( 'main-navs', 'no-ajax', 'bp-navs', 'single-screen-navs' ); $component = bp_current_component(); $bp_nouveau = bp_nouveau(); if ( bp_is_user() ) { $component = 'members'; $menu_type = 'users-nav'; } else { $menu_type = 'groups-nav'; } $customizer_option = ( bp_is_user() )? 'user_nav_display' : 'group_nav_display'; $layout_prefs = (int) bp_nouveau_get_temporary_setting( $customizer_option, bp_nouveau_get_appearance_settings( $customizer_option ) ); // Set the global for a later use - this is moved from the `bp_nouveau_get_container_classes() // But was set as a check for this array class addition. $bp_nouveau->{$component}->single_primary_nav_layout = $layout_prefs; if ( 1 === $layout_prefs ) { $classes[] = 'vertical'; } else { $classes[] = 'horizontal'; } $classes[] = $menu_type; $class = array_map( 'sanitize_html_class', $classes ); /** * Filters the final results for BuddyPress Nouveau single item nav classes. * * This filter will return a single string of concatenated classes to be used. * * @since BuddyPress 3.0.0 * * @param string $value Concatenated classes. * @param array $classes Array of classes that were concatenated. */ return apply_filters( 'bp_nouveau_get_single_item_nav_classes', join( ' ', $class ), $classes ); }
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.