bp_nouveau_messages_adjust_admin_nav( $admin_nav )

Adjust admin message navigation for notices.

Description

Source

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

function bp_nouveau_messages_adjust_admin_nav( $admin_nav ) {
	if ( empty( $admin_nav ) ) {
		return $admin_nav;
	}

	$user_messages_link = trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() );

	foreach ( $admin_nav as $nav_iterator => $nav ) {
		$nav_id = str_replace( 'my-account-messages-', '', $nav['id'] );

		if ( 'notices' === $nav_id ) {
			$admin_nav[ $nav_iterator ]['href'] = esc_url( add_query_arg( array(
				'page' => 'bp-notices'
			), bp_get_admin_url( 'admin.php' ) ) );
		}
	}

	return $admin_nav;
}

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.