2011-03-29 66 views

回答

2

我實際上認爲這只是他們在覈心文件中遺漏的東西。我創建使用掛鉤一個新問題:

function groups_subnav_hook() { 
    global $bp; 

    $groups_link = $bp->loggedin_user->domain . $bp->groups->slug . '/'; 

    bp_core_new_subnav_item(array(
     'name' => 'Create New Group' , 
     'slug' => 'create', 
     'parent_slug' => $bp->groups->slug, 
     'parent_url' => $groups_link, 
     'position' => 10, 
     'screen_function' => 'groups_screen_group_members', 
     'user_has_access' => bp_is_my_profile() // Only the logged in user can access this on his/her profile 
    )); 
} 
add_action('wp', 'groups_subnav_hook', 2); 
add_action('admin_menu', 'groups_subnav_hook', 2);