Skip to:
Content

BuddyPress.org

Changeset 1891 for trunk/bp-core.php


Ignore:
Timestamp:
09/16/2009 09:23:40 PM (16 years ago)
Author:
apeatling
Message:

Fixing profile pages to work when xprofile is disabled. Added more extensive options to groups_invite_user().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core.php

    r1887 r1891  
    325325    global $bp;
    326326   
    327     if ( !function_exists('xprofile_install') ) {
     327    /***
     328     * If the extended profiles component is disabled, we need to revert to using the
     329     * built in WordPress profile information
     330     */
     331    if ( !function_exists( 'xprofile_install' ) ) {
     332        /* Fallback wire values if xprofile is disabled */
     333        $bp->core->profile->slug = 'profile';
     334        $bp->active_components[$bp->core->profile->slug] = $bp->core->profile->slug;
     335
    328336        /* Add 'Profile' to the main navigation */
    329         bp_core_add_nav_item( __('Profile', 'buddypress'), 'profile' );
    330         bp_core_add_nav_default( 'profile', 'bp_core_catch_profile_uri', 'public' );
     337        bp_core_new_nav_item( array(
     338            'name' => __('Profile', 'buddypress'),
     339            'slug' => $bp->core->profile->slug,
     340            'position' => 20,
     341            'screen_function' => 'bp_core_catch_profile_uri',
     342            'default_subnav_slug' => 'public'
     343        ) );
    331344
    332345        $profile_link = $bp->loggedin_user->domain . '/profile/';
    333 
     346       
    334347        /* Add the subnav items to the profile */
    335348        bp_core_new_subnav_item( array(
     
    337350            'slug' => 'public',
    338351            'parent_url' => $profile_link,
    339             'parent_slug' => 'profile',
    340             'screen_function' => 'xprofile_screen_display_profile',
    341             'position' => 10
     352            'parent_slug' => $bp->core->profile->slug,
     353            'screen_function' => 'bp_core_catch_profile_uri'
    342354        ) );
     355       
    343356
    344357        if ( 'profile' == $bp->current_component ) {
Note: See TracChangeset for help on using the changeset viewer.