<!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][12551] trunk/src: Add the total items amount in Activity and Groups Admin List Tables</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 { white-space: pre-line; 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/12551">12551</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/12551","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>2020-02-25 23:51:13 +0000 (Tue, 25 Feb 2020)</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'>Add the total items amount in Activity and Groups Admin List Tables

The "All" view of the corresponding administration screens is now including the total amount of items between parenthesis.

Props bhargavbhandari90, DJPaul, Hnla

Fixes <a href="http://buddypress.trac.wordpress.org/ticket/7526">#7526</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcbpactivityclassesclassbpactivitylisttablephp">trunk/src/bp-activity/classes/class-bp-activity-list-table.php</a></li>
<li><a href="#trunksrcbpgroupsclassesclassbpgroupslisttablephp">trunk/src/bp-groups/classes/class-bp-groups-list-table.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcbpactivityclassesclassbpactivitylisttablephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/bp-activity/classes/class-bp-activity-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-activity/classes/class-bp-activity-list-table.php    2020-01-31 16:40:15 UTC (rev 12550)
+++ trunk/src/bp-activity/classes/class-bp-activity-list-table.php      2020-02-25 23:51:13 UTC (rev 12551)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -39,6 +39,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">        public $spam_count = 0;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">        /**
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         * Total number of activities.
+        *
+        * @since 6.0.0
+        * @var int $all_count
+        */
+       public $all_count = 0;
+
+       /**
</ins><span class="cx" style="display: block; padding: 0 10px">          * Store activity-to-user-ID mappings for use in the In Response To column.
</span><span class="cx" style="display: block; padding: 0 10px">         *
</span><span class="cx" style="display: block; padding: 0 10px">         * @since 1.6.0
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -97,23 +105,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                $per_page = $this->get_items_per_page( str_replace( '-', '_', "{$this->screen->id}_per_page" ) );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Check if we're on the "Spam" view.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['activity_status'] ) && 'spam' == $_REQUEST['activity_status'] ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['activity_status'] ) && 'spam' === $_REQUEST['activity_status'] ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $spam       = 'spam_only';
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->view = 'spam';
</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">-                // Sort order.
-               if ( !empty( $_REQUEST['order'] ) && 'desc' != $_REQUEST['order'] )
-                       $sort = 'ASC';
-
-               // Order by.
-               /*if ( !empty( $_REQUEST['orderby'] ) ) {
-               }*/
-
</del><span class="cx" style="display: block; padding: 0 10px">                 // Filter.
</span><span class="cx" style="display: block; padding: 0 10px">                if ( ! empty( $_REQUEST['activity_type'] ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $filter = array( 'action' => $_REQUEST['activity_type'] );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Set the view as a filtered one.
+                       $this->view = 'filtered';
+
</ins><span class="cx" style="display: block; padding: 0 10px">                         /**
</span><span class="cx" style="display: block; padding: 0 10px">                         * Filter here to override the filter with a filter query
</span><span class="cx" style="display: block; padding: 0 10px">                         *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -133,13 +136,21 @@
</span><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">                // Are we doing a search?
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['s'] ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['s'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $search_terms = $_REQUEST['s'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Set the view as a search request.
+                       $this->view = 'search';
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Check if user has clicked on a specific activity (if so, fetch only that, and any related, activity).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['aid'] ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['aid'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $include_id = (int) $_REQUEST['aid'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Set the view as a single activity.
+                       $this->view = 'single';
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Get the spam total (ignoring any search query or filter).
</span><span class="cx" style="display: block; padding: 0 10px">                $spams = bp_activity_get( array(
</span><span class="cx" style="display: block; padding: 0 10px">                        'display_comments' => 'stream',
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -160,7 +171,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'search_terms'     => $search_terms,
</span><span class="cx" style="display: block; padding: 0 10px">                        'filter_query'     => $filter_query,
</span><span class="cx" style="display: block; padding: 0 10px">                        'show_hidden'      => true,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        // 'sort'             => $sort,
</del><span class="cx" style="display: block; padding: 0 10px">                         'spam'             => $spam,
</span><span class="cx" style="display: block; padding: 0 10px">                        'count_total'      => 'count_query',
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -184,7 +194,7 @@
</span><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">                // Set raw data to display.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                $this->items       = $new_activities;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         $this->items = $new_activities;
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Store information needed for handling table pagination.
</span><span class="cx" style="display: block; padding: 0 10px">                $this->set_pagination_args( array(
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -195,6 +205,25 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Don't truncate activity items; bp_activity_truncate_entry() needs to be used inside a BP_Activity_Template loop.
</span><span class="cx" style="display: block; padding: 0 10px">                remove_filter( 'bp_get_activity_content_body', 'bp_activity_truncate_entry', 5 );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               // Set the Total number of activities.
+               if ( 'all' === $this->view ) {
+                       $this->all_count = (int) $activities['total'];
+
+               // Only perform a query if not on the main list view.
+               } elseif ( 'single' !== $this->view ) {
+                       $count_activities = bp_activity_get(
+                               array(
+                                       'fields'      => 'ids',
+                                       'show_hidden' => true,
+                                       'count_total' => 'count_query',
+                               )
+                       );
+
+                       if ( $count_activities['total'] ) {
+                               $this->all_count = (int) $count_activities['total'];
+                       }
+               }
</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">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -309,12 +338,34 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <h2 class="screen-reader-text"><?php
</span><span class="cx" style="display: block; padding: 0 10px">                        /* translators: accessibility text */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        _e( 'Filter activities list', 'buddypress' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 esc_html_e( 'Filter activities list', 'buddypress' );
</ins><span class="cx" style="display: block; padding: 0 10px">                 ?></h2>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <ul class="subsubsub">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'spam' != $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
-                       <li class="spam"><a href="<?php echo esc_url( add_query_arg( array( 'activity_status' => 'spam' ), $url_base ) ); ?>" class="<?php if ( 'spam' == $this->view ) echo 'current'; ?>"><?php printf( __( 'Spam <span class="count">(%s)</span>', 'buddypress' ), number_format_i18n( $this->spam_count ) ); ?></a></li>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <li class="all">
+                               <a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'all' === $this->view ) echo 'current'; ?>">
+                               <?php printf(
+                                               /* translators: %s is the placeholder for the count html tag `<span class="count"/>` */
+                                               esc_html__( 'All %s', 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->all_count )
+                                               )
+                                       ); ?>
+                               </a> |
+                       </li>
+                       <li class="spam">
+                               <a href="<?php echo esc_url( add_query_arg( array( 'activity_status' => 'spam' ), $url_base ) ); ?>" class="<?php if ( 'spam' === $this->view ) echo 'current'; ?>">
+                                       <?php printf(
+                                               /* translators: %s is the placeholder for the count html tag `<span class="count"/>` */
+                                               esc_html__( 'Spam %s', 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->spam_count )
+                                               )
+                                       ); ?>
+                               </a>
+                       </li>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre></div>
<a id="trunksrcbpgroupsclassesclassbpgroupslisttablephp"></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/classes/class-bp-groups-list-table.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/bp-groups/classes/class-bp-groups-list-table.php        2020-01-31 16:40:15 UTC (rev 12550)
+++ trunk/src/bp-groups/classes/class-bp-groups-list-table.php  2020-02-25 23:51:13 UTC (rev 12551)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -95,7 +95,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                // Sort order.
</span><span class="cx" style="display: block; padding: 0 10px">                $order = 'DESC';
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['order'] ) ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['order'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $order = ( 'desc' == strtolower( $_REQUEST['order'] ) ) ? 'DESC' : 'ASC';
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -119,14 +119,22 @@
</span><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">                // Are we doing a search?
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['s'] ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['s'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $search_terms = $_REQUEST['s'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                        // Set the view as a search request.
+                       $this->view = 'search';
+               }
+
</ins><span class="cx" style="display: block; padding: 0 10px">                 // Check if user has clicked on a specific group (if so, fetch only that group).
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                if ( !empty( $_REQUEST['gid'] ) )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+         if ( ! empty( $_REQUEST['gid'] ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                         $include_id = (int) $_REQUEST['gid'];
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                // Set the current view.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 // Set the view as a single activity.
+                       $this->view = 'single';
+               }
+
+               // Use the status request to set the current view.
</ins><span class="cx" style="display: block; padding: 0 10px">                 if ( isset( $_GET['group_status'] ) && in_array( $_GET['group_status'], array( 'public', 'private', 'hidden' ) ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">                        $this->view = $_GET['group_status'];
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -186,6 +194,24 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        'total_items' => $groups_template->total_group_count,
</span><span class="cx" style="display: block; padding: 0 10px">                        'total_pages' => ceil( $groups_template->total_group_count / $per_page )
</span><span class="cx" style="display: block; padding: 0 10px">                ) );
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+
+               // Set the Total number of groups.
+               if ( 'all' === $this->view ) {
+                       $this->group_counts['all'] = (int) $groups_template->total_group_count;
+
+               // Only perform a query if not on the main list view.
+               } elseif ( 'single' !== $this->view ) {
+                       $count_groups = groups_get_groups(
+                               array(
+                                       'fields'      => 'ids',
+                                       'show_hidden' => true,
+                               )
+                       );
+
+                       if ( $count_groups['total'] ) {
+                               $this->group_counts['all'] = (int) $count_groups['total'];
+                       }
+               }
</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">        /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -331,10 +357,54 @@
</span><span class="cx" style="display: block; padding: 0 10px">                ?></h2>
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                <ul class="subsubsub">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        <li class="all"><a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'all' == $this->view ) echo 'current'; ?>"><?php _e( 'All', 'buddypress' ); ?></a> |</li>
-                       <li class="public"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'public', $url_base ) ); ?>" class="<?php if ( 'public' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Public <span class="count">(%s)</span>', 'Public <span class="count">(%s)</span>', $this->group_counts['public'], 'buddypress' ), number_format_i18n( $this->group_counts['public'] ) ); ?></a> |</li>
-                       <li class="private"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'private', $url_base ) ); ?>" class="<?php if ( 'private' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>', $this->group_counts['private'], 'buddypress' ), number_format_i18n( $this->group_counts['private'] ) ); ?></a> |</li>
-                       <li class="hidden"><a href="<?php echo esc_url( add_query_arg( 'group_status', 'hidden', $url_base ) ); ?>" class="<?php if ( 'hidden' == $this->view ) echo 'current'; ?>"><?php printf( _n( 'Hidden <span class="count">(%s)</span>', 'Hidden <span class="count">(%s)</span>', $this->group_counts['hidden'], 'buddypress' ), number_format_i18n( $this->group_counts['hidden'] ) ); ?></a></li>
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 <li class="all">
+                               <a href="<?php echo esc_url( $url_base ); ?>" class="<?php if ( 'all' === $this->view ) echo 'current'; ?>">
+                                       <?php printf(
+                                               /* translators: %s is the placeholder for the count html tag `<span class="count"/>` */
+                                               esc_html__( 'All %s', 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->group_counts['all'] )
+                                               )
+                                       ); ?>
+                               </a> |
+                       </li>
+                       <li class="public">
+                               <a href="<?php echo esc_url( add_query_arg( 'group_status', 'public', $url_base ) ); ?>" class="<?php if ( 'public' === $this->view ) echo 'current'; ?>">
+                                       <?php printf(
+                                               /* translators: %s is the placeholder for the count html `<span class="count"/>` */
+                                               _n( 'Public %s', 'Public %s', $this->group_counts['public'], 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->group_counts['public'] )
+                                               )
+                                       ); ?>
+                               </a> |
+                       </li>
+                       <li class="private">
+                               <a href="<?php echo esc_url( add_query_arg( 'group_status', 'private', $url_base ) ); ?>" class="<?php if ( 'private' === $this->view ) echo 'current'; ?>">
+                                       <?php printf(
+                                               /* translators: %s is the placeholder for the count html `<span class="count"/>` */
+                                               _n( 'Private %s', 'Private %s', $this->group_counts['private'], 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->group_counts['private'] )
+                                               )
+                                       ); ?>
+                               </a> |
+                       </li>
+                       <li class="hidden">
+                               <a href="<?php echo esc_url( add_query_arg( 'group_status', 'hidden', $url_base ) ); ?>" class="<?php if ( 'hidden' === $this->view ) echo 'current'; ?>">
+                                       <?php printf(
+                                               /* translators: %s is the placeholder for the count html tag */
+                                               _n( 'Hidden %s', 'Hidden %s', $this->group_counts['hidden'], 'buddypress' ),
+                                               sprintf(
+                                                       '<span class="count">(%s)</span>',
+                                                       number_format_i18n( $this->group_counts['hidden'] )
+                                               )
+                                       ); ?>
+                               </a>
+                       </li>
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        <?php
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span></span></pre>
</div>
</div>

</body>
</html>