Changeset 5406 for trunk/bp-forums/bp-forums-admin.php
- Timestamp:
- 11/28/2011 10:30:03 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/bp-forums/bp-forums-admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-forums/bp-forums-admin.php
r5329 r5406 6 6 global $bp; 7 7 8 if ( !bp_current_user_can( 'bp_moderate' ) ) 9 return false; 10 11 // Add the administration tab under the "Site Admin" tab for site administrators 12 $hook = add_submenu_page( 'bp-general-settings', __( 'Forums', 'buddypress' ), __( 'Forums', 'buddypress' ), 'manage_options', 'bb-forums-setup', "bp_forums_bbpress_admin" ); 8 if ( ! bp_current_user_can( 'bp_moderate' ) ) 9 return; 10 11 // Add the option pages 12 $hook = add_options_page( __( 'BuddyPress Forums', 'buddypress' ), __( 'BuddyPress Forums', 'buddypress' ), 'manage_options', 'bb-forums-setup', 'bp_forums_bbpress_admin' ); 13 14 // Add a hook for common BP admin CSS/JS scripts 13 15 add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' ); 16 17 // Fudge the highlighted subnav item when on a BuddyPress admin page 18 add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' ); 14 19 } 15 20 add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
Note: See TracChangeset
for help on using the changeset viewer.