Ticket #7552: 7552.01.patch
| File 7552.01.patch, 2.1 KB (added by , 9 years ago) |
|---|
-
src/bp-core/bp-core-buddybar.php
61 61 * To mimic legacy behavior, if bp_core_create_nav_link() returns false, we make 62 62 * an early exit and don't attempt to register the screen function. 63 63 */ 64 if ( false === $nav_item ) {64 if ( false === $nav_item && ! isset( $r['visibility'] ) ) { 65 65 return false; 66 66 } 67 67 … … 151 151 'default_subnav_slug' => $r['default_subnav_slug'] 152 152 ); 153 153 154 if ( isset( $r['visibility'] ) ) { 155 $nav_item['visibility'] = $r['visibility']; 156 } 157 158 if ( isset( $r['visibility'] ) && false === $r['visibility'] ) { 159 return $nav_item; 160 } 161 154 162 // Add the item to the nav. 155 163 buddypress()->{$component}->nav->add_nav( $nav_item ); 156 164 … … 226 234 * the logged in user is not the displayed user 227 235 * looking at their own profile, don't don't register this screen function. 228 236 */ 229 if ( empty( $r['show_for_displayed_user'] ) && ! bp_user_has_access() ) {237 if ( ! isset( $r['visibility'] ) && empty( $r['show_for_displayed_user'] ) && ! bp_user_has_access() ) { 230 238 return false; 231 239 } 232 240 -
src/bp-messages/classes/class-bp-messages-component.php
162 162 163 163 // Add 'Messages' to the main navigation. 164 164 $main_nav = array( 165 'name' => $nav_name,166 'slug' => $slug,167 'position' => 50,168 ' show_for_displayed_user'=> $access,169 'screen_function' => 'messages_screen_inbox',170 'default_subnav_slug' => 'inbox',171 'item_css_id' => $this->id165 'name' => $nav_name, 166 'slug' => $slug, 167 'position' => 50, 168 'visibility' => $access, 169 'screen_function' => 'messages_screen_inbox', 170 'default_subnav_slug' => 'inbox', 171 'item_css_id' => $this->id 172 172 ); 173 173 174 174 // Add the subnav items to the profile.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)