Skip to:
Content
Pages
Categories
Search
Top
Bottom

Problem adding subnav item to Account Info > Groups in adminbar

  • @caplain

    Member

    I’m trying to add a ‘Create Group’ subnav item to the Account Info > Groups nav item in the adminbar. I added the following (paranoid version) to my /plugins/bp-custom.php. It crashes my site, but I can’t see why…

    function bp_add_create_group_subnav() {
    global $bp;
    $groups_link = isset($bp->groups->slug) ? $bp->groups->slug . ‘/’ : ‘/groups/’;

    /* Add the subnav items to the groups nav item */
    if (function_exists(‘bp_core_new_subnav_item’)) {
    bp_core_new_subnav_item( array(
    ‘name’ => __( ‘Create Network’, ‘buddypress’ ),
    ‘slug’ => ‘create’,
    ‘parent_url’ => $groups_link,
    ‘parent_slug’ => $bp->groups->slug,
    ‘screen_function’ => ‘groups_screen_group_home’,
    ‘position’ => 10,
    ‘item_css_id’ => ‘home’ ) );
    }
    }
    add_action(‘groups_setup_nav’, ‘bp_add_create_group_subnav’);

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Problem adding subnav item to Account Info > Groups in adminbar’ is closed to new replies.
Skip to toolbar