Ticket #8471: 8471.2.patch
File 8471.2.patch, 7.6 KB (added by , 3 years ago) |
---|
-
src/bp-activity/classes/class-bp-activity-component.php
diff --git src/bp-activity/classes/class-bp-activity-component.php src/bp-activity/classes/class-bp-activity-component.php index d54966b49..0d180946d 100644
class BP_Activity_Component extends BP_Component { 367 367 'parent' => 'my-account-' . $this->id, 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 ); 373 373 -
src/bp-blogs/classes/class-bp-blogs-component.php
diff --git src/bp-blogs/classes/class-bp-blogs-component.php src/bp-blogs/classes/class-bp-blogs-component.php index 854660dda..d735740e0 100644
class BP_Blogs_Component extends BP_Component { 296 296 'parent' => 'my-account-' . $this->id, 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 ); 302 302 -
src/bp-core/bp-core-buddybar.php
diff --git src/bp-core/bp-core-buddybar.php src/bp-core/bp-core-buddybar.php index afbb2f287..336a52ad8 100644
function bp_core_new_nav_default( $args = '' ) { 325 325 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 ) ) { 342 365 -
src/bp-friends/classes/class-bp-friends-component.php
diff --git src/bp-friends/classes/class-bp-friends-component.php src/bp-friends/classes/class-bp-friends-component.php index 1921fc70a..287a6f417 100644
class BP_Friends_Component extends BP_Component { 271 271 'parent' => 'my-account-' . $this->id, 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 ); 277 277 -
src/bp-groups/classes/class-bp-groups-component.php
diff --git src/bp-groups/classes/class-bp-groups-component.php src/bp-groups/classes/class-bp-groups-component.php index 2010c274d..df567e36f 100644
class BP_Groups_Component extends BP_Component { 843 843 'parent' => 'my-account-' . $this->id, 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 ); 849 849 -
src/bp-members/classes/class-bp-members-component.php
diff --git src/bp-members/classes/class-bp-members-component.php src/bp-members/classes/class-bp-members-component.php index bd078301b..a7deff76d 100644
class BP_Members_Component extends BP_Component { 639 639 'parent' => 'my-account-' . $this->id, 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 ); 645 645 -
src/bp-messages/classes/class-bp-messages-component.php
diff --git src/bp-messages/classes/class-bp-messages-component.php src/bp-messages/classes/class-bp-messages-component.php index 5271c00f6..27e9c46c8 100644
class BP_Messages_Component extends BP_Component { 346 346 'parent' => 'my-account-' . $this->id, 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 ); 352 352 -
src/bp-notifications/classes/class-bp-notifications-component.php
diff --git src/bp-notifications/classes/class-bp-notifications-component.php src/bp-notifications/classes/class-bp-notifications-component.php index 4511b7a05..3fc8b3405 100644
class BP_Notifications_Component extends BP_Component { 257 257 'parent' => 'my-account-' . $this->id, 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 ); 263 263 -
src/bp-settings/classes/class-bp-settings-component.php
diff --git src/bp-settings/classes/class-bp-settings-component.php src/bp-settings/classes/class-bp-settings-component.php index 507eec647..c39bff37e 100644
class BP_Settings_Component extends BP_Component { 259 259 'parent' => 'my-account-' . $this->id, 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 ); 265 265 -
src/bp-xprofile/classes/class-bp-xprofile-component.php
diff --git src/bp-xprofile/classes/class-bp-xprofile-component.php src/bp-xprofile/classes/class-bp-xprofile-component.php index 305ebea94..ccd260205 100644
class BP_XProfile_Component extends BP_Component { 344 344 'parent' => 'my-account-' . $this->id, 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 ); 350 350