Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/21/2011 12:03:25 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Move more user functions out of core component and into user component. Fixes to loaders. More code clean-up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-settings/bp-settings-loader.php

    r3757 r3778  
    3131        $this->slug      = BP_SETTINGS_SLUG;
    3232        $this->root_slug = isset( $bp->pages->settings->slug ) ? $bp->pages->settings->slug : $this->slug;
     33       
     34        // Register this in the active components array
     35        $bp->active_components[$this->id] = $this->id;
    3336    }
    3437
     
    5659        bp_core_new_nav_item( array(
    5760            'name'                    => __( 'Settings', 'buddypress' ),
    58             'slug'                    => $bp->settings->slug,
     61            'slug'                    => $this->slug,
    5962            'position'                => 100,
    6063            'show_for_displayed_user' => bp_users_can_edit_settings(),
     
    7073            'slug'            => 'general',
    7174            'parent_url'      => $settings_link,
    72             'parent_slug'     => $bp->settings->slug,
     75            'parent_slug'     => $this->slug,
    7376            'screen_function' => 'bp_settings_screen_general_settings',
    7477            'position'        => 10,
     
    8184            'slug'            => 'notifications',
    8285            'parent_url'      => $settings_link,
    83             'parent_slug'     => $bp->settings->slug,
     86            'parent_slug'     => $this->slug,
    8487            'screen_function' => 'bp_settings_screen_notification_settings',
    8588            'position'        => 20,
     
    9396                'slug'            => 'delete-account',
    9497                'parent_url'      => $settings_link,
    95                 'parent_slug'     => $bp->settings->slug,
     98                'parent_slug'     => $this->slug,
    9699                'screen_function' => 'bp_settings_screen_delete_account',
    97100                'position'        => 90,
     
    101104    }
    102105}
     106// Create the settingss component
    103107$bp->settings = new BP_Settings_Component();
    104108
    105 function bp_users_add_settings_nav() {
    106     global $bp;
    107 
    108     // Register this in the active components array
    109     $bp->active_components[$bp->settings->slug] = $bp->settings->id;
    110 
    111     do_action( 'bp_core_settings_setup_nav' );
    112 }
    113 
    114109?>
Note: See TracChangeset for help on using the changeset viewer.