- Timestamp:
- 05/24/2018 05:17:07 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/src/bp-templates/bp-nouveau/includes/messages/functions.php
r12105 r12116 115 115 'more' => __( '(and %d others)', 'buddypress' ), 116 116 ), 117 'rootUrl' => trailingslashit( str_replace( home_url(), '', bp_displayed_user_domain() ) . bp_get_messages_slug() ), 117 118 ); 118 119 … … 179 180 if ( 'notices' === $secondary_nav_item->slug ) { 180 181 bp_core_remove_subnav_item( bp_get_messages_slug(), $secondary_nav_item->slug, 'members' ); 181 } else { 182 $params = array( 'link' => '#' . $secondary_nav_item->slug ); 183 184 // Make sure Admins won't write a messages from the user's account. 185 if ( 'compose' === $secondary_nav_item->slug ) { 186 $params['user_has_access'] = bp_is_my_profile(); 187 } 188 189 $bp->members->nav->edit_nav( $params, $secondary_nav_item->slug, bp_get_messages_slug() ); 182 } elseif ( 'compose' === $secondary_nav_item->slug ) { 183 $bp->members->nav->edit_nav( array( 184 'user_has_access' => bp_is_my_profile() 185 ), $secondary_nav_item->slug, bp_get_messages_slug() ); 190 186 } 191 187 } … … 205 201 $nav_id = str_replace( 'my-account-messages-', '', $nav['id'] ); 206 202 207 if ( 'my-account-messages' !== $nav_id ) { 208 if ( 'notices' === $nav_id ) { 209 $admin_nav[ $nav_iterator ]['href'] = esc_url( add_query_arg( array( 'page' => 'bp-notices' ), bp_get_admin_url( 'users.php' ) ) ); 210 } else { 211 $admin_nav[ $nav_iterator ]['href'] = $user_messages_link . '#' . trim( $nav_id ); 212 } 203 if ( 'notices' === $nav_id ) { 204 $admin_nav[ $nav_iterator ]['href'] = esc_url( add_query_arg( array( 205 'page' => 'bp-notices' 206 ), bp_get_admin_url( 'users.php' ) ) ); 213 207 } 214 208 }
Note: See TracChangeset
for help on using the changeset viewer.