From 03f1de2f92a32c4ae97c212e07593ffb0db08cc4 Mon Sep 17 00:00:00 2001 From: denisbaranov Date: Wed, 10 Jul 2019 13:02:04 +0300 Subject: [PATCH] Issue: Redundant 'Email me when' label Link: https://secure.helpscout.net/conversation/898983348/31998?folderId=1405025 --- includes/core/um-actions-account.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/includes/core/um-actions-account.php b/includes/core/um-actions-account.php index 782d34be..9aec39ed 100644 --- a/includes/core/um-actions-account.php +++ b/includes/core/um-actions-account.php @@ -410,14 +410,19 @@ add_action( 'um_before_account_delete', 'um_before_account_delete' ); /** * Before notifications account tab content */ -function um_before_account_notifications() { ?> -
-
- -
+function um_before_account_notifications( $args = array() ) { + $output = UM()->account()->get_tab_fields( 'notifications', $args ); + if( substr_count( $output, '_enable_new_' ) ) { + ?> +
+
+ +
+
-
-