From f39cea1d7bb58ebc13475e852568788c36dfd298 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Thu, 6 Jun 2019 11:15:37 -0600
Subject: [PATCH] Don't output a privacy request view if when the request count
for that view is 0.
---
src/wp-admin/includes/class-wp-privacy-requests-table.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/wp-admin/includes/class-wp-privacy-requests-table.php b/src/wp-admin/includes/class-wp-privacy-requests-table.php
index fe5a516431..148ea21930 100644
a
|
b
|
abstract class WP_Privacy_Requests_Table extends WP_List_Table { |
177 | 177 | $current_link_attributes = $status === $current_status ? ' class="current" aria-current="page"' : ''; |
178 | 178 | $total_status_requests = absint( $counts->{$status} ); |
179 | 179 | |
| 180 | if ( ! $total_status_requests ) { |
| 181 | continue; |
| 182 | } |
| 183 | |
180 | 184 | $status_label = sprintf( |
181 | 185 | translate_nooped_plural( $post_status->label_count, $total_status_requests ), |
182 | 186 | number_format_i18n( $total_status_requests ) |