Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/28/2011 10:30:03 PM (14 years ago)
Author:
djpaul
Message:

Relocates the top-level BuddyPress admin menu to under the Settings and Users menus. Maintains compatibility with third-party plugins that add their admin menus under the old top-level BP menu. See #3708.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-admin.php

    r5329 r5406  
    66    global $bp;
    77
    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
    1315    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' );
    1419}
    1520add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
Note: See TracChangeset for help on using the changeset viewer.