Ticket #3381: xprofile_subnav.patch
| File xprofile_subnav.patch, 2.3 KB (added by , 15 years ago) |
|---|
-
bp-core/bp-core-buddybar.php
86 86 do_action( 'bp_core_new_nav_item', $r, $args, $defaults ); 87 87 } 88 88 89 function bp_is_component_subnav_exists($component = false){ 90 global $bp; 91 92 if (!$component) 93 $component = $bp->current_component; 94 95 if (count($bp->bp_options_nav[$component]) > 0) 96 return true; 97 98 return false; 99 } 100 101 89 102 /** 90 103 * Modify the default subnav item to load when a top level nav item is clicked. 91 104 * -
bp-themes/bp-default/members/single/profile.php
8 8 */ 9 9 10 10 ?> 11 <?php if (bp_is_component_subnav_exists()) : ?> 11 12 12 <?php if ( bp_is_my_profile() ) : ?>13 14 13 <div class="item-list-tabs no-ajax" id="subnav" role="navigation"> 15 14 <ul> 16 15 … … 20 19 </div><!-- .item-list-tabs --> 21 20 22 21 <?php endif; ?> 23 22 24 23 <?php do_action( 'bp_before_profile_content' ); ?> 25 24 26 25 <div class="profile" role="main"> -
bp-xprofile/bp-xprofile-loader.php
118 118 'item_css_id' => $this->id 119 119 ); 120 120 121 $profile_link = trailingslashit( $bp-> loggedin_user->domain . $this->slug );121 $profile_link = trailingslashit( $bp->displayed_user->domain . $this->slug ); 122 122 123 123 // Add the subnav items to the profile 124 124 $sub_nav[] = array( … … 137 137 'parent_url' => $profile_link, 138 138 'parent_slug' => $this->slug, 139 139 'screen_function' => 'xprofile_screen_edit_profile', 140 'position' => 20 141 );140 'position' => 20, 141 'user_has_access' => bp_is_my_profile() ); 142 142 143 143 // Change Avatar 144 144 $sub_nav[] = array( … … 147 147 'parent_url' => $profile_link, 148 148 'parent_slug' => $this->slug, 149 149 'screen_function' => 'xprofile_screen_change_avatar', 150 'position' => 30 151 );150 'position' => 30, 151 'user_has_access' => bp_is_my_profile() ); 152 152 153 153 parent::setup_nav( $main_nav, $sub_nav ); 154 154 }
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)