Changeset 6317 for trunk/bp-settings/bp-settings-loader.php
- Timestamp:
- 09/07/2012 02:50:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-settings/bp-settings-loader.php
r6182 r6317 18 18 * @since BuddyPress (1.5) 19 19 */ 20 function __construct() {20 public function __construct() { 21 21 parent::start( 22 22 'settings', … … 31 31 * @global BuddyPress $bp The one true BuddyPress instance 32 32 */ 33 function includes() { 34 // Files to include 35 $includes = array( 33 public function includes() { 34 parent::includes( array( 36 35 'actions', 37 36 'screens', 38 37 'template', 39 38 'functions', 40 ); 41 42 parent::includes( $includes ); 39 ) ); 43 40 } 44 41 … … 51 48 * @since BuddyPress (1.5) 52 49 */ 53 function setup_globals() {50 public function setup_globals() { 54 51 55 52 // Define a slug, if necessary … … 58 55 59 56 // All globals for settings component. 60 $globals =array(57 parent::setup_globals( array( 61 58 'slug' => BP_SETTINGS_SLUG, 62 59 'has_directory' => false, 63 ); 64 65 parent::setup_globals( $globals ); 60 ) ); 66 61 } 67 62 … … 69 64 * Setup BuddyBar navigation 70 65 */ 71 function setup_nav() {66 public function setup_nav() { 72 67 73 68 // Define local variable … … 147 142 /** 148 143 * Set up the Toolbar 149 * 150 * @global BuddyPress $bp The one true BuddyPress instance151 */ 152 function setup_admin_bar() {153 global $bp;144 */ 145 public function setup_admin_bar() { 146 147 // The instance 148 $bp = buddypress(); 154 149 155 150 // Prevent debug notices … … 203 198 204 199 function bp_setup_settings() { 205 global $bp; 206 $bp->settings = new BP_Settings_Component(); 200 buddypress()->settings = new BP_Settings_Component(); 207 201 } 208 202 add_action( 'bp_setup_components', 'bp_setup_settings', 6 ); 209 210 ?>
Note: See TracChangeset
for help on using the changeset viewer.