Skip to:
Content

BuddyPress.org

Changeset 25


Ignore:
Timestamp:
04/14/2008 05:53:41 AM (13 years ago)
Author:
apeatling
Message:

Moved admin settings under Site Admin tab.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp_friends.php

    r18 r25  
    4848function friends_add_menu()
    4949{   
    50     global $wpdb, $table_name, $bp_friends;
     50    global $wpdb, $table_name, $bp_friends, $userdata;
    5151    $table_name = $wpdb->base_prefix . "bp_friends";
    5252   
    53     /* Instantiate bp_Friends class to do the real work. */
    54     $bp_friends = new BP_Friends;
    55     $bp_friends->bp_friends();
    56    
    57     add_menu_page("Friends", "Friends", 1, basename(__FILE__), "friends_list");
    58     add_submenu_page(basename(__FILE__), "My Friends", "My Friends", 1, basename(__FILE__), "friends_list");
    59     add_submenu_page(basename(__FILE__), "Friend Finder", "Friend Finder", 1, "friend_finder", "friends_find");
    60 
    61     /* Add the administration tab under the "Site Admin" tab for site administrators */
    62     add_submenu_page('bp_core.php', "Friends", "Friends", 1, basename(__FILE__), "friends_settings");
    63 
     53    if($wpdb->blogid == $userdata->primary_blog)
     54    {
     55        /* Instantiate bp_Friends class to do the real work. */
     56        $bp_friends = new BP_Friends;
     57        $bp_friends->bp_friends();
     58   
     59        add_menu_page("Friends", "Friends", 1, basename(__FILE__), "friends_list");
     60        add_submenu_page(basename(__FILE__), "My Friends", "My Friends", 1, basename(__FILE__), "friends_list");
     61        add_submenu_page(basename(__FILE__), "Friend Finder", "Friend Finder", 1, "friend_finder", "friends_find");
     62
     63        /* Add the administration tab under the "Site Admin" tab for site administrators */
     64        add_submenu_page('wpmu-admin.php', "Friends", "Friends", 1, basename(__FILE__), "friends_settings");
     65    }
     66   
    6467    /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    6568    if($wpdb->get_var("show tables like '%" . $table_name . "%'") == false) friends_install();
Note: See TracChangeset for help on using the changeset viewer.