bp_nouveau_get_single_item_subnav_classes()

Returns the single item subnav container classes.


Return Return

(string) CSS classes


Source Source

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

	function bp_nouveau_get_single_item_subnav_classes() {
		$classes = array( 'bp-navs', 'bp-subnavs', 'no-ajax' );

		// Set user or group class string
		if ( bp_is_user() ) {
			$classes[] = 'user-subnav';
		}

		if ( bp_is_group() ) {
			$classes[] = 'group-subnav';
		}

		if ( ( bp_is_group() && 'send-invites' === bp_current_action() ) || ( bp_is_group_create() && 'group-invites' === bp_get_groups_current_create_step() ) ) {
			$classes[] = 'bp-invites-nav';
		}

		$customizer_option = ( bp_is_user() )? 'user_subnav_tabs' : 'group_subnav_tabs';
		$nav_tabs = (int) bp_nouveau_get_temporary_setting( $customizer_option, bp_nouveau_get_appearance_settings( $customizer_option ) );

		if ( bp_is_user() && 1 === $nav_tabs ) {
			$classes[] = 'tabbed-links';
		}

		if ( bp_is_group() && 1 === $nav_tabs ) {
			$classes[] = 'tabbed-links';
		}

		$class = array_map( 'sanitize_html_class', $classes );

		/**
		 * Filters the final results for BuddyPress Nouveau single item subnav classes.
		 *
		 * This filter will return a single string of concatenated classes to be used.
		 *
		 * @since 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_subnav_classes', join( ' ', $class ), $classes );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.