Changeset 13093
- Timestamp:
- 08/25/2021 08:13:04 AM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r13001 r13093 368 368 'id' => 'my-account-' . $this->id . '-personal', 369 369 'title' => _x( 'Personal', 'My Account Activity sub nav', 'buddypress' ), 370 'href' => $activity_link,370 'href' => trailingslashit( $activity_link . 'just-me' ), 371 371 'position' => 10 372 372 ); -
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r13024 r13093 297 297 'id' => 'my-account-' . $this->id . '-my-sites', 298 298 'title' => __( 'My Sites', 'buddypress' ), 299 'href' => $blogs_link,299 'href' => trailingslashit( $blogs_link . 'my-sites' ), 300 300 'position' => 10 301 301 ); -
trunk/src/bp-core/bp-core-buddybar.php
r12893 r13093 326 326 $parent_nav = reset( $parent_nav ); 327 327 328 if ( ! empty( $parent_nav->screen_function ) ) {329 // Remove our screen hook if screen function is callable.330 if ( is_callable( $parent_nav->screen_function ) ) {331 remove_action( 'bp_screens', $parent_nav->screen_function, 3 );332 }333 }334 335 328 // Edit the screen function for the parent nav. 336 $bp->members->nav->edit_nav( array( 337 'screen_function' => &$r['screen_function'], 338 'default_subnav_slug' => $r['subnav_slug'], 339 ), $parent_nav->slug ); 329 $bp->members->nav->edit_nav( 330 array( 331 'screen_function' => &$r['screen_function'], 332 'default_subnav_slug' => $r['subnav_slug'], 333 ), 334 $parent_nav->slug 335 ); 336 337 /** 338 * Update secondary nav items: 339 * - The previous default nav item needs to have its slug added to its link property. 340 * - The new default nav item needs to have its slug removed from its link property. 341 */ 342 $previous_default_subnav = $bp->members->nav->get( $parent_nav->slug . '/' . $parent_nav->default_subnav_slug ); 343 344 // Edit the link of the previous default nav item. 345 $bp->members->nav->edit_nav( 346 array( 347 'link' => trailingslashit( $previous_default_subnav->link . $previous_default_subnav->slug ), 348 ), 349 $previous_default_subnav->slug, 350 $parent_nav->slug 351 ); 352 353 $new_default_subnav = $bp->members->nav->get( $parent_nav->slug . '/' . $r['subnav_slug'] ); 354 355 // Edit the link of the new default nav item. 356 $bp->members->nav->edit_nav( 357 array( 358 'link' => rtrim( untrailingslashit( $new_default_subnav->link ), $new_default_subnav->slug ), 359 ), 360 $new_default_subnav->slug, 361 $parent_nav->slug 362 ); 340 363 341 364 if ( bp_is_current_component( $parent_nav->slug ) ) { -
trunk/src/bp-friends/classes/class-bp-friends-component.php
r13092 r13093 272 272 'id' => 'my-account-' . $this->id . '-friendships', 273 273 'title' => _x( 'Friendships', 'My Account Friends menu sub nav', 'buddypress' ), 274 'href' => $friends_link,274 'href' => trailingslashit( $friends_link . 'my-friends' ), 275 275 'position' => 10, 276 276 ); -
trunk/src/bp-groups/classes/class-bp-groups-component.php
r13087 r13093 844 844 'id' => 'my-account-' . $this->id . '-memberships', 845 845 'title' => _x( 'Memberships', 'My Account Groups sub nav', 'buddypress' ), 846 'href' => $groups_link,846 'href' => trailingslashit( $groups_link . 'my-groups' ), 847 847 'position' => 10 848 848 ); -
trunk/src/bp-members/classes/class-bp-members-component.php
r13087 r13093 640 640 'id' => 'my-account-' . $this->id . '-public', 641 641 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 642 'href' => $profile_link,642 'href' => trailingslashit( $profile_link . 'public' ), 643 643 'position' => 10 644 644 ); -
trunk/src/bp-messages/classes/class-bp-messages-component.php
r13005 r13093 347 347 'id' => 'my-account-' . $this->id . '-inbox', 348 348 'title' => $inbox, 349 'href' => $messages_link,349 'href' => trailingslashit( $messages_link . 'inbox' ), 350 350 'position' => 10 351 351 ); -
trunk/src/bp-notifications/classes/class-bp-notifications-component.php
r13091 r13093 258 258 'id' => 'my-account-' . $this->id . '-unread', 259 259 'title' => $unread, 260 'href' => $notifications_link,260 'href' => trailingslashit( $notifications_link . 'unread' ), 261 261 'position' => 10, 262 262 ); -
trunk/src/bp-settings/classes/class-bp-settings-component.php
r13091 r13093 260 260 'id' => 'my-account-' . $this->id . '-general', 261 261 'title' => __( 'General', 'buddypress' ), 262 'href' => $settings_link,262 'href' => trailingslashit( $settings_link . 'general' ), 263 263 'position' => 10, 264 264 ); -
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r12994 r13093 345 345 'id' => 'my-account-' . $this->id . '-public', 346 346 'title' => _x( 'View', 'My Account Profile sub nav', 'buddypress' ), 347 'href' => $profile_link,347 'href' => trailingslashit( $profile_link . 'public' ), 348 348 'position' => 10 349 349 );
Note: See TracChangeset
for help on using the changeset viewer.