2011-03-29 59 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);