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

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
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.