Changeset 7454
- Timestamp:
- 10/22/2013 07:31:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
-
bp-activity/bp-activity-loader.php (modified) (1 diff)
-
bp-blogs/bp-blogs-loader.php (modified) (1 diff)
-
bp-core/bp-core-component.php (modified) (4 diffs)
-
bp-forums/bp-forums-loader.php (modified) (1 diff)
-
bp-friends/bp-friends-loader.php (modified) (1 diff)
-
bp-groups/bp-groups-loader.php (modified) (1 diff)
-
bp-members/bp-members-loader.php (modified) (1 diff)
-
bp-messages/bp-messages-loader.php (modified) (1 diff)
-
bp-settings/bp-settings-loader.php (modified) (1 diff)
-
bp-xprofile/bp-xprofile-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-loader.php
r7400 r7454 29 29 'activity', 30 30 __( 'Activity Streams', 'buddypress' ), 31 BP_PLUGIN_DIR 31 BP_PLUGIN_DIR, 32 array( 33 'adminbar_myaccount_order' => 10 34 ) 32 35 ); 33 36 } -
trunk/bp-blogs/bp-blogs-loader.php
r7352 r7454 24 24 'blogs', 25 25 __( 'Site Tracking', 'buddypress' ), 26 BP_PLUGIN_DIR 26 BP_PLUGIN_DIR, 27 array( 28 'adminbar_myaccount_order' => 30 29 ) 27 30 ); 28 31 } -
trunk/bp-core/bp-core-component.php
r7445 r7454 115 115 * @since BuddyPress (1.5.0) 116 116 * 117 * @uses bp_Component::setup_actions() Set up the hooks and actions.117 * @uses BP_Component::setup_actions() Set up the hooks and actions. 118 118 * 119 119 * @param string $id Unique ID (for internal identification). Letters, … … 123 123 * @param string $path The file path for the component's files. Used by 124 124 * {@link BP_Component::includes()}. 125 */ 126 public function start( $id = '', $name = '', $path = '' ) { 125 * @param array $params Additional parameters used by the component. 126 * The config array supports the following values: 127 * - 'adminbar_myaccount_order' Sets the position for our 128 * component menu under the WP Toolbar's "My Account" menu. 129 */ 130 public function start( $id = '', $name = '', $path = '', $params = array() ) { 127 131 128 132 // Internal identifier of component … … 134 138 // Path for includes 135 139 $this->path = $path; 140 141 // Miscellaneous component parameters that need to be set early on 142 if ( ! empty( $params ) ) { 143 // Sets the position for our menu under the WP Toolbar's "My Account" menu 144 if ( ! empty( $params['adminbar_myaccount_order'] ) ) { 145 $this->adminbar_myaccount_order = (int) $params['adminbar_myaccount_order']; 146 } 147 148 // Set defaults if not passed 149 } else { 150 // new component menus are added before the settings menu if not set 151 $this->adminbar_myaccount_order = 90; 152 } 136 153 137 154 // Move on to the next step … … 305 322 306 323 // Setup WP Toolbar menus 307 add_action( 'bp_setup_admin_bar', array( $this, 'setup_admin_bar' ), 10);324 add_action( 'bp_setup_admin_bar', array( $this, 'setup_admin_bar' ), $this->adminbar_myaccount_order ); 308 325 309 326 // Setup component title -
trunk/bp-forums/bp-forums-loader.php
r7347 r7454 24 24 'forums', 25 25 __( 'Discussion Forums', 'buddypress' ), 26 BP_PLUGIN_DIR 26 BP_PLUGIN_DIR, 27 array( 28 'adminbar_myaccount_order' => 80 29 ) 27 30 ); 28 31 } -
trunk/bp-friends/bp-friends-loader.php
r7392 r7454 23 23 'friends', 24 24 __( 'Friend Connections', 'buddypress' ), 25 BP_PLUGIN_DIR 25 BP_PLUGIN_DIR, 26 array( 27 'adminbar_myaccount_order' => 60 28 ) 26 29 ); 27 30 } -
trunk/bp-groups/bp-groups-loader.php
r7442 r7454 82 82 'groups', 83 83 __( 'User Groups', 'buddypress' ), 84 BP_PLUGIN_DIR 84 BP_PLUGIN_DIR, 85 array( 86 'adminbar_myaccount_order' => 70 87 ) 85 88 ); 86 89 } -
trunk/bp-members/bp-members-loader.php
r7347 r7454 23 23 'members', 24 24 __( 'Members', 'buddypress' ), 25 BP_PLUGIN_DIR 25 BP_PLUGIN_DIR, 26 array( 27 'adminbar_myaccount_order' => 20 28 ) 26 29 ); 27 30 } -
trunk/bp-messages/bp-messages-loader.php
r7430 r7454 32 32 'messages', 33 33 __( 'Private Messages', 'buddypress' ), 34 BP_PLUGIN_DIR 34 BP_PLUGIN_DIR, 35 array( 36 'adminbar_myaccount_order' => 50 37 ) 35 38 ); 36 39 } -
trunk/bp-settings/bp-settings-loader.php
r7347 r7454 22 22 'settings', 23 23 __( 'Settings', 'buddypress' ), 24 BP_PLUGIN_DIR 24 BP_PLUGIN_DIR, 25 array( 26 'adminbar_myaccount_order' => 100 27 ) 25 28 ); 26 29 } -
trunk/bp-xprofile/bp-xprofile-loader.php
r7347 r7454 40 40 'xprofile', 41 41 __( 'Extended Profiles', 'buddypress' ), 42 BP_PLUGIN_DIR 42 BP_PLUGIN_DIR, 43 array( 44 'adminbar_myaccount_order' => 20 45 ) 43 46 ); 44 47 }
Note: See TracChangeset
for help on using the changeset viewer.