| @@ -1,27 +1,35 @@ | ||
| 1 | +<?php | |
| 2 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. | |
| 3 | +defined('ABSPATH') || die('Restricted Access'); | |
| 4 | +?> | |
| 1 | 5 | <div class="acym__content cell grid-x acym__users__display__subscriptions--list"> |
| 2 | - <h5 class="cell acym__title acym__title__secondary"><?php echo acym_translation('ACYM_LISTS'); ?></h5> | |
| 6 | + <h5 class="cell acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_LISTS')); ?></h5> | |
| 3 | 7 | <div class="cell acym__content__tab"> |
| 4 | 8 | <?php |
| 5 | - $subscriptionIdentifier = $data['tab']->startTab(acym_translation('ACYM_SUBSCRIBED').' ('.count($data['subscriptions']).')', false, '', !empty($data['subscriptions'])); | |
| 9 | + $subscriptionIdentifier = $data['tab']->startTab(acym_translation('ACYM_SUBSCRIBED').' ('.count($data['subscriptions']).')', false, !empty($data['subscriptions'])); | |
| 6 | 10 | include acym_getView('users', 'edit_subscription_subscribed', true); |
| 7 | 11 | $data['tab']->endTab(); |
| 8 | 12 | |
| 9 | - $unsubscriptionIdentifier = $data['tab']->startTab(acym_translation('ACYM_UNSUBSCRIBED').' ('.count($data['unsubscribe']).')', false, '', !empty($data['unsubscribe'])); | |
| 13 | + $unsubscriptionIdentifier = $data['tab']->startTab(acym_translation('ACYM_UNSUBSCRIBED').' ('.count($data['unsubscribe']).')', false, !empty($data['unsubscribe'])); | |
| 10 | 14 | include acym_getView('users', 'edit_subscription_unsubscribed', true); |
| 11 | 15 | $data['tab']->endTab(); |
| 12 | 16 | |
| 13 | - $data['tab']->addElementInBar( | |
| 14 | - '<div class="acym__users__display__list--action acym__user__action--unsubscribeall"> | |
| 15 | - <i class="acymicon-times-circle"></i><span>'.acym_translation('ACYM_UNSUBSCRIBE_ALL').'</span> | |
| 16 | - </div>', | |
| 17 | + $data['tab']->addCallbackElement( | |
| 18 | + function () { | |
| 19 | + echo '<div class="acym__users__display__list--action acym__user__action--unsubscribeall"> | |
| 20 | + <i class="acymicon-times-circle"></i><span>'.esc_html(acym_translation('ACYM_UNSUBSCRIBE_ALL')).'</span> | |
| 21 | + </div>'; | |
| 22 | + }, | |
| 17 | 23 | $subscriptionIdentifier |
| 18 | 24 | ); |
| 19 | 25 | |
| 20 | - $data['tab']->addElementInBar( | |
| 21 | - '<div class="acym__users__display__list--action acym__user__action--resubscribeall"> | |
| 22 | - <i class="acymicon-add"></i><span>'.acym_translation('ACYM_RESUBSCRIBE_ALL').'</span> | |
| 23 | - </div>', | |
| 26 | + $data['tab']->addCallbackElement( | |
| 27 | + function () { | |
| 28 | + echo '<div class="acym__users__display__list--action acym__user__action--resubscribeall"> | |
| 29 | + <i class="acymicon-add"></i><span>'.esc_html(acym_translation('ACYM_RESUBSCRIBE_ALL')).'</span> | |
| 30 | + </div>'; | |
| 31 | + }, | |
| 24 | 32 | $unsubscriptionIdentifier |
| 25 | 33 | ); |
| 26 | 34 | |
| 27 | 35 | $data['tab']->display('lists_user'); |