<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[BuddyPress][9131] trunk/src: Improve Group's Edit WP Admin Bar menu</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="http://buddypress.trac.wordpress.org/changeset/9131">9131</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"http://buddypress.trac.wordpress.org/changeset/9131","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>imath</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2014-11-10 19:13:04 +0000 (Mon, 10 Nov 2014)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Improve Group's Edit WP Admin Bar menu
Use the group's manage options nav to populate the different edit links of the group's Edit WP Admin Bar.
Introduce a new parameter {{{show_in_admin_bar}}} for the edit screen property of the Group Extension API to allow plugins add their edit link into this Admin Bar (if this parameter is set to true).
props boonebgorges
Fixes <a href="http://buddypress.trac.wordpress.org/ticket/6002">#6002</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpcorebpcorebuddybarphp">trunk/src/bp-core/bp-core-buddybar.php</a></li>
<li><a href="#trunksrcbpgroupsbpgroupsadminbarphp">trunk/src/bp-groups/bp-groups-adminbar.php</a></li>
<li><a href="#trunksrcbpgroupsbpgroupsclassesphp">trunk/src/bp-groups/bp-groups-classes.php</a></li>
<li><a href="#trunksrcbpgroupsbpgroupsloaderphp">trunk/src/bp-groups/bp-groups-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpcorebpcorebuddybarphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-core/bp-core-buddybar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-core/bp-core-buddybar.php 2014-11-10 15:50:07 UTC (rev 9130)
+++ trunk/src/bp-core/bp-core-buddybar.php 2014-11-10 19:13:04 UTC (rev 9131)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -253,6 +253,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * when the nav item is clicked.
</span><span class="cx" style="display: block; padding: 0 10px"> * @type string $link Optional. The URL that the subnav item should point
</span><span class="cx" style="display: block; padding: 0 10px"> * to. Defaults to a value generated from the $parent_url + $slug.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @type bool $show_in_admin_bar Optional. Whether the nav item should be
+ * added into the group's "Edit" Admin Bar menu for group admins.
+ * Default: false.
</ins><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool|null Returns false on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -260,17 +263,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $bp;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $r = wp_parse_args( $args, array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'name' => false, // Display name for the nav item
- 'slug' => false, // URL slug for the nav item
- 'parent_slug' => false, // URL slug of the parent nav item
- 'parent_url' => false, // URL of the parent item
- 'item_css_id' => false, // The CSS ID to apply to the HTML of the nav item
- 'user_has_access' => true, // Can the logged in user see this nav item?
- 'no_access_url' => '',
- 'site_admin_only' => false, // Can only site admins see this nav item?
- 'position' => 90, // Index of where this nav item should be positioned
- 'screen_function' => false, // The name of the function to run when clicked
- 'link' => '' // The link for the subnav item; optional, not usually required.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'name' => false, // Display name for the nav item
+ 'slug' => false, // URL slug for the nav item
+ 'parent_slug' => false, // URL slug of the parent nav item
+ 'parent_url' => false, // URL of the parent item
+ 'item_css_id' => false, // The CSS ID to apply to the HTML of the nav item
+ 'user_has_access' => true, // Can the logged in user see this nav item?
+ 'no_access_url' => '',
+ 'site_admin_only' => false, // Can only site admins see this nav item?
+ 'position' => 90, // Index of where this nav item should be positioned
+ 'screen_function' => false, // The name of the function to run when clicked
+ 'link' => '', // The link for the subnav item; optional, not usually required.
+ 'show_in_admin_bar' => false, // Show the Manage link in the current group's "Edit" Admin Bar menu
</ins><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> extract( $r, EXTR_SKIP );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -297,15 +301,17 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $item_css_id = $slug;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $subnav_item = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'name' => $name,
- 'link' => trailingslashit( $link ),
- 'slug' => $slug,
- 'css_id' => $item_css_id,
- 'position' => $position,
- 'user_has_access' => $user_has_access,
- 'no_access_url' => $no_access_url,
- 'screen_function' => &$screen_function
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'name' => $name,
+ 'link' => trailingslashit( $link ),
+ 'slug' => $slug,
+ 'css_id' => $item_css_id,
+ 'position' => $position,
+ 'user_has_access' => $user_has_access,
+ 'no_access_url' => $no_access_url,
+ 'screen_function' => &$screen_function,
+ 'show_in_admin_bar' => (bool) $r['show_in_admin_bar'],
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
</ins><span class="cx" style="display: block; padding: 0 10px"> $bp->bp_options_nav[$parent_slug][$slug] = $subnav_item;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span></span></pre></div>
<a id="trunksrcbpgroupsbpgroupsadminbarphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-adminbar.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-adminbar.php 2014-11-10 15:50:07 UTC (rev 9130)
+++ trunk/src/bp-groups/bp-groups-adminbar.php 2014-11-10 19:13:04 UTC (rev 9131)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,15 +23,18 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * access to group admin options.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function bp_groups_group_admin_menu() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_admin_bar, $bp;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $wp_admin_bar;
+ $bp = buddypress();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only show if viewing a group
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !bp_is_group() )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! bp_is_group() || bp_is_group_create() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Only show this menu to group admins and super admins
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( !bp_current_user_can( 'bp_moderate' ) && !bp_group_is_admin() )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! bp_current_user_can( 'bp_moderate' ) && ! bp_group_is_admin() ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return false;
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Unique ID for the 'Edit Group' menu
</span><span class="cx" style="display: block; padding: 0 10px"> $bp->group_admin_menu_id = 'group-admin';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,67 +46,39 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'href' => bp_get_group_permalink( $bp->groups->current_group )
</span><span class="cx" style="display: block; padding: 0 10px"> ) );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Group Admin > Edit details
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'edit-details',
- 'title' => __( 'Edit Details', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/edit-details' )
- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Index of the Manage tabs parent slug
+ $nav_index = $bp->groups->current_group->slug . '_manage';
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Group Admin > Group settings
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'group-settings',
- 'title' => __( 'Edit Settings', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/group-settings' )
- ) );
-
- // Group Admin > Group avatar
- if ( !(int)bp_get_option( 'bp-disable-avatar-uploads' ) && $bp->avatar->show_avatars ) {
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'group-avatar',
- 'title' => __( 'Edit Profile Photo', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/group-avatar' )
- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Check if current group has Manage tabs
+ if ( empty( $bp->bp_options_nav[ $nav_index ] ) ) {
+ return;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Group Admin > Manage invitations
- if ( bp_is_active( 'friends' ) ) {
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'manage-invitations',
- 'title' => __( 'Manage Invitations', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'send-invites' )
- ) );
- }
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Build the Group Admin menus
+ foreach ( $bp->bp_options_nav[ $nav_index ] as $menu ) {
+ /**
+ * Should we add the current manage link in the Group's "Edit" Admin Bar menu ?
+ *
+ * All core items will be added, plugins can use a new parameter in the BP Group Extension API
+ * to also add the link to the "edit screen" of their group component. To do so, set the
+ * the 'show_in_admin_bar' argument of your edit screen to true
+ */
+ if ( $menu['show_in_admin_bar'] ) {
+ $title = sprintf( _x( 'Edit Group %s', 'Group WP Admin Bar manage links', 'buddypress' ), $menu['name'] );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Group Admin > Manage members
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'manage-members',
- 'title' => __( 'Manage Members', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/manage-members' )
- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Title is specific for delete
+ if ( 'delete-group' == $menu['slug'] ) {
+ $title = sprintf( _x( '%s Group', 'Group WP Admin Bar delete link', 'buddypress' ), $menu['name'] );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Group Admin > Membership Requests
- if ( bp_get_group_status( $bp->groups->current_group ) == 'private' ) {
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'membership-requests',
- 'title' => __( 'Membership Requests', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/membership-requests' )
- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_admin_bar->add_menu( array(
+ 'parent' => $bp->group_admin_menu_id,
+ 'id' => $menu['slug'],
+ 'title' => $title,
+ 'href' => bp_get_groups_action_link( 'admin/' . $menu['slug'] )
+ ) );
+ }
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-
- // Delete Group
- $wp_admin_bar->add_menu( array(
- 'parent' => $bp->group_admin_menu_id,
- 'id' => 'delete-group',
- 'title' => __( 'Delete Group', 'buddypress' ),
- 'href' => bp_get_groups_action_link( 'admin/delete-group' )
- ) );
</del><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> add_action( 'admin_bar_menu', 'bp_groups_group_admin_menu', 99 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcbpgroupsbpgroupsclassesphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-classes.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-classes.php 2014-11-10 15:50:07 UTC (rev 9130)
+++ trunk/src/bp-groups/bp-groups-classes.php 2014-11-10 19:13:04 UTC (rev 9131)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3667,8 +3667,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $current_group = groups_get_current_group();
</span><span class="cx" style="display: block; padding: 0 10px"> $admin_link = trailingslashit( bp_get_group_permalink( $current_group ) . 'admin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // Add the tab to the manage navigation
- bp_core_new_subnav_item( array(
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $subnav_args = array(
</ins><span class="cx" style="display: block; padding: 0 10px"> 'name' => $screen['name'],
</span><span class="cx" style="display: block; padding: 0 10px"> 'slug' => $screen['slug'],
</span><span class="cx" style="display: block; padding: 0 10px"> 'parent_slug' => $current_group->slug . '_manage',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3676,8 +3675,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'user_has_access' => bp_is_item_admin(),
</span><span class="cx" style="display: block; padding: 0 10px"> 'position' => $position,
</span><span class="cx" style="display: block; padding: 0 10px"> 'screen_function' => 'groups_screen_group_admin',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // Should we add a menu to the Group's WP Admin Bar
+ if ( ! empty( $screen['show_in_admin_bar'] ) ) {
+ $subnav_args['show_in_admin_bar'] = true;
+ }
+
+ // Add the tab to the manage navigation
+ bp_core_new_subnav_item( $subnav_args );
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Catch the edit screen and forward it to the plugin template
</span><span class="cx" style="display: block; padding: 0 10px"> if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && bp_is_action_variable( $screen['slug'], 0 ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $this->call_edit_screen_save( $this->group_id );
</span></span></pre></div>
<a id="trunksrcbpgroupsbpgroupsloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-groups/bp-groups-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/bp-groups-loader.php 2014-11-10 15:50:07 UTC (rev 9130)
+++ trunk/src/bp-groups/bp-groups-loader.php 2014-11-10 19:13:04 UTC (rev 9131)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -507,18 +507,16 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'item_css_id' => 'admin',
</span><span class="cx" style="display: block; padding: 0 10px"> 'no_access_url' => $group_link,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- }
</del><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- // If viewing an admin page, create the group admin subnav items
- if ( bp_is_group_admin_page() ) {
</del><span class="cx" style="display: block; padding: 0 10px"> $admin_link = trailingslashit( $group_link . 'admin' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Common params to all nav items
</span><span class="cx" style="display: block; padding: 0 10px"> $default_params = array(
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 'parent_url' => $admin_link,
- 'parent_slug' => $this->current_group->slug . '_manage',
- 'screen_function' => 'groups_screen_group_admin',
- 'user_has_access' => bp_is_item_admin(),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ 'parent_url' => $admin_link,
+ 'parent_slug' => $this->current_group->slug . '_manage',
+ 'screen_function' => 'groups_screen_group_admin',
+ 'user_has_access' => bp_is_item_admin(),
+ 'show_in_admin_bar' => true,
</ins><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $sub_nav[] = array_merge( array(
</span></span></pre>
</div>
</div>
</body>
</html>