PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.0
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.0
11.1.1 11.1.0 11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 All 62 releases
← All changes | back/Views/Users/tmpl/edit_information.php +41 -16 10.0.1 → 11.1.0 View file →
@@ -1,50 +1,75 @@
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 +
5 +use AcyMailing\Classes\FieldClass;
6 +?>
1 7 <div class="cell acym__content acym__user__edit__custom__fields margin-y">
2 8 <?php
3 9 if (!empty($data['allFields'])) {
10 + $fieldClass = new FieldClass();
4 11 foreach ($data['allFields'] as $field) {
5 - if (intval($field->active) === 0) continue;
6 - echo $field->html;
12 + if (intval($field['field']->active) === 0) {
13 + continue;
14 + }
15 +
16 + $fieldClass->displayField(
17 + $field['field'],
18 + $field['defaultValue'],
19 + $field['values'],
20 + true,
21 + !acym_isAdmin(),
22 + $field['user'],
23 + $field['showField']
24 + );
7 25 }
8 26 }
9 27 ?>
10 28 <div class="cell grid-x margin-top-1">
11 - <?php echo acym_switch('user[active]', $data['user-information']->active, acym_translation('ACYM_ACTIVE')); ?>
29 + <?php acym_switch(['name' => 'user[active]', 'value' => $data['user-information']->active, 'label' => acym_translation('ACYM_ACTIVE')]); ?>
12 30 </div>
13 31 <?php if ($this->config->get('require_confirmation', '0') == '1') { ?>
14 32 <div class="cell grid-x">
15 - <?php echo acym_switch('user[confirmed]', $data['user-information']->confirmed, acym_translation('ACYM_CONFIRMED')); ?>
33 + <?php acym_switch(['name' => 'user[confirmed]', 'value' => $data['user-information']->confirmed, 'label' => acym_translation('ACYM_CONFIRMED')]); ?>
16 34 </div>
17 35 <?php } ?>
18 36 <div class="cell grid-x">
19 37 <?php
20 - $label = acym_translation('ACYM_TRACK_THIS_SUBSCRIBER');
21 - $label .= acym_info('ACYM_TRACK_THIS_SUBSCRIBER_DESC');
22 - echo acym_switch('user[tracking]', $data['user-information']->tracking, $label, []); ?>
38 + acym_switch([
39 + 'name' => 'user[tracking]',
40 + 'value' => $data['user-information']->tracking,
41 + 'label' => acym_translation('ACYM_TRACK_THIS_SUBSCRIBER'),
42 + 'tip' => ['textShownInTooltip' => 'ACYM_TRACK_THIS_SUBSCRIBER_DESC'],
43 + ]); ?>
23 44 </div>
24 45 <?php if (!empty($data['user-information']->source)) { ?>
25 46 <div class="cell grid-x margin-top-1">
26 47 <div class="cell medium-6 small-12">
27 48 <?php
28 - echo acym_translation('ACYM_DATE_CREATED').' : <b>';
29 - echo acym_date(
30 - empty($data['user-information']->id) ? time() : $data['user-information']->creation_date,
31 - acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC3')
49 + echo esc_html(acym_translation('ACYM_DATE_CREATED')).' : <b>';
50 + echo esc_html(
51 + acym_date(
52 + empty($data['user-information']->id) ? time() : $data['user-information']->creation_date,
53 + acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC3')
54 + )
32 55 );
33 56 echo '</b>';
34 57 ?>
35 58 </div>
36 59 <div class="cell medium-6 small-12">
37 - <?php echo acym_translation('ACYM_SOURCE'); ?> : <b><?php echo acym_escape($data['user-information']->source); ?></b>
60 + <?php echo esc_html(acym_translation('ACYM_SOURCE')); ?> : <b><?php echo esc_html($data['user-information']->source); ?></b>
38 61 </div>
39 62 </div>
40 63 <?php } else { ?>
41 64 <div class="cell margin-top-1">
42 - <?php echo acym_translation('ACYM_DATE_CREATED'); ?> : <b>
65 + <?php echo esc_html(acym_translation('ACYM_DATE_CREATED')); ?> : <b>
43 66 <?php
44 - echo acym_date(
45 - empty($data['user-information']->id) ? time() : $data['user-information']->creation_date,
46 - acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC3')
67 + echo esc_html(
68 + acym_date(
69 + empty($data['user-information']->id) ? time() : $data['user-information']->creation_date,
70 + acym_getDateTimeFormat('ACYM_DATE_FORMAT_LC3')
71 + )
47 72 );
48 73 ?>
49 74 </b>
50 75 </div>