Changeset 13683
- Timestamp:
- 12/29/2023 11:05:38 AM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/12.0/src/bp-core/bp-core-functions.php
r13679 r13683 4992 4992 4993 4993 if ( isset( $component->sub_nav ) && is_array( $component->sub_nav ) && $component->sub_nav ) { 4994 // We possibly need to move some members nav items. 4995 if ( 'members' === $key_component && isset( $navigations['profile']['sub_nav'] ) ) { 4996 $profile_subnav_slugs = wp_list_pluck( $navigations['profile']['sub_nav'], 'slug' ); 4997 foreach ( $component->sub_nav as $members_subnav ) { 4998 if ( 'profile' === $members_subnav['parent_slug'] && ! in_array( $members_subnav['slug'], $profile_subnav_slugs, true ) ) { 4999 $navigations['profile']['sub_nav'][] = $members_subnav; 5000 } 5001 } 4994 $navigations[ $key_component ]['sub_nav'] = $component->sub_nav; 4995 } 4996 } 4997 4998 // We possibly need to move some members nav items. 4999 if ( isset( $navigations['members']['sub_nav'], $navigations['profile']['sub_nav'] ) ) { 5000 $profile_subnav_slugs = wp_list_pluck( $navigations['profile']['sub_nav'], 'slug' ); 5001 5002 foreach ( $navigations['members']['sub_nav'] as $members_subnav ) { 5003 if ( 'profile' === $members_subnav['parent_slug'] && ! in_array( $members_subnav['slug'], $profile_subnav_slugs, true ) ) { 5004 $navigations['profile']['sub_nav'][] = $members_subnav; 5002 5005 } 5003 5004 $navigations[ $key_component ]['sub_nav'] = $component->sub_nav;5005 5006 } 5006 5007 }
Note: See TracChangeset
for help on using the changeset viewer.