Skip to content

Commit bdccb87

Browse files
committed
Always output counter badge
1 parent dca354a commit bdccb87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/packages/forms/src/contact-form/class-contact-form-plugin.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,8 +1414,10 @@ public function unread_count() {
14141414
// show the count on Jetpack and Jetpack → Forms
14151415
$unread = self::get_unread_count();
14161416

1417-
if ( $unread > 0 && isset( $submenu['jetpack'] ) && is_array( $submenu['jetpack'] ) && ! empty( $submenu['jetpack'] ) ) {
1418-
$forms_unread_count_tag = " <span class='jp-feedback-unread-counter count-{$unread} awaiting-mod'><span class='feedback-unread-counter'>" . number_format_i18n( $unread ) . '</span></span>';
1417+
if ( isset( $submenu['jetpack'] ) && is_array( $submenu['jetpack'] ) && ! empty( $submenu['jetpack'] ) ) {
1418+
$inline_style = ( $unread > 0 ) ? '' : 'style="display: none;"';
1419+
1420+
$forms_unread_count_tag = " <span class='jp-feedback-unread-counter count-{$unread} awaiting-mod' {$inline_style}><span class='feedback-unread-counter'>" . number_format_i18n( $unread ) . '</span></span>';
14191421
$jetpack_badge_count = $unread;
14201422

14211423
// Main menu entries

0 commit comments

Comments
 (0)