Privacy: Hide views that have a count of 0 on privacy request tables, for consistency with other list tables.

Props pbiron, garrett-eclipse, mapk, melchoyce, estelaris.
Fixes #47495.
Built from https://develop.svn.wordpress.org/trunk@48284


git-svn-id: http://core.svn.wordpress.org/trunk@48053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-07-03 16:28:04 +00:00
parent 83c7b67c32
commit 8e43a329d4
2 changed files with 5 additions and 1 deletions

View File

@ -179,6 +179,10 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table {
$current_link_attributes = $status === $current_status ? ' class="current" aria-current="page"' : '';
$total_status_requests = absint( $counts->{$status} );
if ( ! $total_status_requests ) {
continue;
}
$status_label = sprintf(
translate_nooped_plural( $post_status->label_count, $total_status_requests ),
number_format_i18n( $total_status_requests )

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.5-alpha-48283';
$wp_version = '5.5-alpha-48284';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.