Making WordPress.org

Changeset 9294


Ignore:
Timestamp:
11/24/2019 03:09:56 PM (7 years ago)
Author:
ocean90
Message:

WP I18N Teams: Skip filter links without results.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wp-i18n-teams/views/all-locales.php

    r4441 r9294  
    1515
    1616                foreach ( $release_statuses as $status => $nooped_plural ) {
     17                        if ( $locale_data['status_counts'][ $status ] < 1 ) {
     18                                continue;
     19                        }
     20
    1721                        $string = translate_nooped_plural( $nooped_plural, $locale_data['status_counts'][ $status ] );
    1822                        $string = sprintf( $string, sprintf( '<strong class="i18n-label %s">%s</strong>', $status, $locale_data['status_counts'][ $status ] ) );
    … …  
    3943
    4044                foreach ( $translation_statuses as $status => $nooped_plural ) {
     45                        if ( $locale_data['status_counts'][ $status ] < 1 ) {
     46                                continue;
     47                        }
     48
    4149                        $string = translate_nooped_plural( $nooped_plural, $locale_data['status_counts'][ $status ] );
    4250                        $string = sprintf( $string, sprintf( '<strong class="i18n-label %s">%s</strong>', $status, $locale_data['status_counts'][ $status ] ) );
Note: See TracChangeset for help on using the changeset viewer.