Helper: Don't display (0) in top navigation when no updates available.
This commit is contained in:
parent
0cafd1a499
commit
578f25ebdc
|
@ -6,6 +6,10 @@
|
|||
<?php
|
||||
$count = WC_Helper_Updater::get_updates_count();
|
||||
$count_html = sprintf( '<span class="update-plugins count-%d"><span class="update-count">(%d)</span></span>', $count, number_format_i18n( $count ) );
|
||||
if ( ! $count ) {
|
||||
$count_html = '';
|
||||
}
|
||||
|
||||
$menu_title = sprintf( __( 'WooCommerce.com Subscriptions %s', 'woocommerce' ), $count_html );
|
||||
?>
|
||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons§ion=helper' ) ); ?>" class="nav-tab nav-tab-active"><?php echo $menu_title; ?></a>
|
||||
|
|
|
@ -17,6 +17,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php
|
||||
$count = WC_Helper_Updater::get_updates_count();
|
||||
$count_html = sprintf( '<span class="update-plugins count-%d"><span class="update-count">(%d)</span></span>', $count, number_format_i18n( $count ) );
|
||||
if ( ! $count ) {
|
||||
$count_html = '';
|
||||
}
|
||||
|
||||
$menu_title = sprintf( __( 'WooCommerce.com Subscriptions %s', 'woocommerce' ), $count_html );
|
||||
?>
|
||||
<a href="<?php echo esc_url( admin_url( 'admin.php?page=wc-addons§ion=helper' ) ); ?>" class="nav-tab"><?php echo $menu_title; ?></a>
|
||||
|
|
Loading…
Reference in New Issue