Changeset 7659
- Timestamp:
- 12/09/2013 02:27:07 PM (12 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-admin.php
r7656 r7659 151 151 add_action( 'bp_register_admin_settings', array( $this, 'register_admin_settings' ) ); 152 152 153 // Add a link to BuddyPress About page to the admin bar 154 add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 15 ); 155 153 156 /** Filters ***********************************************************/ 154 157 … … 332 335 register_setting ( 'buddypress', '_bp_enable_akismet', 'intval' ); 333 336 } 337 } 338 } 339 340 /** 341 * Add a link to BuddyPress About page to the admin bar. 342 * 343 * @since BuddyPress (1.9.0) 344 * 345 * @param WP_Admin_Bar $wp_admin_bar As passed to 'admin_bar_menu'. 346 */ 347 public function admin_bar_about_link( $wp_admin_bar ) { 348 if ( is_user_logged_in() ) { 349 $wp_admin_bar->add_menu( array( 350 'parent' => 'wp-logo', 351 'id' => 'bp-about', 352 'title' => esc_html__( 'About BuddyPress', 'buddypress' ), 353 'href' => add_query_arg( array( 'page' => 'bp-about' ), bp_get_admin_url( 'index.php' ) ), 354 ) ); 334 355 } 335 356 }
Note: See TracChangeset
for help on using the changeset viewer.