bp_nouveau_member_customizer_nav()

Build the Member’s nav for the our customizer control.


Return Return

(array) The Members single item primary nav ordered.


Source Source

File: bp-templates/bp-nouveau/includes/members/functions.php

function bp_nouveau_member_customizer_nav() {
	add_filter( '_bp_nouveau_member_reset_front_template', 'bp_nouveau_member_restrict_user_front_templates', 10, 1 );

	if ( bp_displayed_user_get_front_template( buddypress()->loggedin_user ) ) {
		buddypress()->members->nav->add_nav(
			array(
				'name'     => _x( 'Home', 'Member Home page', 'buddypress' ),
				'slug'     => 'front',
				'position' => 5,
			)
		);
	}

	remove_filter( '_bp_nouveau_member_reset_front_template', 'bp_nouveau_member_restrict_user_front_templates', 10, 1 );

	$nav = buddypress()->members->nav;

	// Eventually reset the order.
	bp_nouveau_set_nav_item_order( $nav, bp_nouveau_get_appearance_settings( 'user_nav_order' ) );

	return $nav->get_primary();
}


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.