Skip to:
Content

BuddyPress.org

Changeset 9937


Ignore:
Timestamp:
06/11/2015 07:03:00 AM (11 years ago)
Author:
johnjamesjacoby
Message:

XProfile: applies changes to BP_XProfile_Component::setup_nav() that did not apply in r9936.

This change brings XProfile's navigation setup method into alignment with all other component's similar methods, and finishes what r9936 started.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-loader.php

    r9936 r9937  
    181181                }
    182182
    183                 $slug         =
    184                 $profile_link = trailingslashit( $user_domain . $this->slug );
     183                $access       = bp_core_can_edit_settings();
     184                $slug         = bp_get_profile_slug();
     185                $profile_link = trailingslashit( $user_domain . $slug );
    185186
    186187                // Add 'Profile' to the main navigation
    187188                $main_nav = array(
    188189                        'name'                => _x( 'Profile', 'Profile header menu', 'buddypress' ),
    189                         'slug'                => $this->slug,
     190                        'slug'                => $slug,
    190191                        'position'            => 20,
    191192                        'screen_function'     => 'xprofile_screen_display_profile',
     
    199200                        'slug'            => 'public',
    200201                        'parent_url'      => $profile_link,
    201                         'parent_slug'     => $this->slug,
     202                        'parent_slug'     => $slug,
    202203                        'screen_function' => 'xprofile_screen_display_profile',
    203204                        'position'        => 10
     
    209210                        'slug'            => 'edit',
    210211                        'parent_url'      => $profile_link,
    211                         'parent_slug'     => $this->slug,
     212                        'parent_slug'     => $slug,
    212213                        'screen_function' => 'xprofile_screen_edit_profile',
    213214                        'position'        => 20,
    214                         'user_has_access' => bp_core_can_edit_settings()
     215                        'user_has_access' => $access
    215216                );
    216217
     
    221222                                'slug'            => 'change-avatar',
    222223                                'parent_url'      => $profile_link,
    223                                 'parent_slug'     => $this->slug,
     224                                'parent_slug'     => $slug,
    224225                                'screen_function' => 'xprofile_screen_change_avatar',
    225226                                'position'        => 30,
    226                                 'user_has_access' => bp_core_can_edit_settings()
     227                                'user_has_access' => $access
    227228                        );
    228229                }
Note: See TracChangeset for help on using the changeset viewer.