Changeset 6602
- Timestamp:
- 06/24/2017 01:40:00 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/classes/class-bbp-admin.php
r6601 r6602 150 150 /** General Actions ***************************************************/ 151 151 152 add_action( 'bbp_admin_menu', array( $this, 'admin_menus' ) ); // Add menu item to settings menu 153 add_action( 'bbp_admin_head', array( $this, 'admin_head' ) ); // Add some general styling to the admin area 154 add_action( 'bbp_admin_notices', array( $this, 'activation_notice' ) ); // Add notice if not using a bbPress theme 155 add_action( 'bbp_register_admin_style', array( $this, 'register_admin_style' ) ); // Add green admin style 156 add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) ); // Add settings 157 add_action( 'bbp_activation', array( $this, 'new_install' ) ); // Add menu item to settings menu 158 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); // Add enqueued CSS 159 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Add enqueued JS 160 add_action( 'admin_bar_menu', array( $this, 'admin_bar_about_link' ), 15 ); // Add a link to bbPress about page to the admin bar 152 add_action( 'bbp_admin_menu', array( $this, 'admin_menus' ) ); // Add menu item to settings menu 153 add_action( 'bbp_admin_head', array( $this, 'admin_head' ) ); // Add some general styling to the admin area 154 add_action( 'bbp_admin_notices', array( $this, 'activation_notice' ) ); // Add notice if not using a bbPress theme 155 add_action( 'bbp_register_admin_style', array( $this, 'register_admin_style' ) ); // Add green admin style 156 add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) ); // Add settings 157 add_action( 'bbp_activation', array( $this, 'new_install' ) ); // Add menu item to settings menu 158 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) ); // Add enqueued CSS 159 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Add enqueued JS 161 160 162 161 /** Ajax **************************************************************/ … … 516 515 // Add a few links to the existing links array 517 516 return array_merge( $links, $new_links ); 518 }519 520 /**521 * Add a link to bbPress about page to the admin bar522 *523 * @since 2.5.0 bbPress (r5136)524 *525 * @param WP_Admin_Bar $wp_admin_bar526 */527 public function admin_bar_about_link( $wp_admin_bar ) {528 if ( is_user_logged_in() && current_user_can( 'bbp_about_page' ) ) {529 $wp_admin_bar->add_menu( array(530 'parent' => 'wp-logo',531 'id' => 'bbp-about',532 'title' => esc_html__( 'About bbPress', 'bbpress' ),533 'href' => add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php' ) )534 ) );535 }536 517 } 537 518
Note: See TracChangeset
for help on using the changeset viewer.