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/genericimport.php +36 -32 10.2.2 → 11.1.0 View file →
@@ -1,13 +1,17 @@
1 -<form id="acym_form" action="<?php echo acym_completeLink(acym_getVar('cmd', 'ctrl')); ?>" method="post" name="acyForm">
2 - <input type="hidden" name="acym_import_filename" id="filename" value="<?php echo acym_getVar('cmd', 'acym_import_filename'); ?>" />
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 +<form id="acym_form" action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" method="post" name="acyForm">
6 + <input type="hidden" name="acym_import_filename" id="filename" value="<?php echo esc_attr(acym_getVar('cmd', 'acym_import_filename')); ?>" />
3 7 <input type="hidden" name="import_columns" id="import_columns" value="" />
4 8 <input type="hidden" name="new_list" id="acym__import__new-list" value="" />
5 9 <div id="acym__users__import__generic" class="acym__content">
6 10 <div class="grid-x grid-margin-y acym_area">
7 11 <div class="">
8 - <div class="acym__title"><?php echo acym_translation('ACYM_FIELD_MATCHING'); ?></div>
9 - <p class="acym__users__import__generic__instructions"><?php echo acym_translation('ACYM_ASSIGN_COLUMNS'); ?></p>
12 + <div class="acym__title"><?php echo esc_html(acym_translation('ACYM_FIELD_MATCHING')); ?></div>
13 + <p class="acym__users__import__generic__instructions"><?php echo wp_kses(acym_translation('ACYM_ASSIGN_COLUMNS'), ['b' => []]); ?></p>
10 14 </div>
11 15
12 16 <div class="cell grid-x" id="acym__users__import__generic__matchdata">
13 17 <?php include acym_getView('users', 'ajaxencoding'); ?>
@@ -14,12 +18,12 @@
14 18 </div>
15 19 </div>
16 20
17 21 <div class="grid-x acym_area">
18 - <div class="acym__title"><?php echo acym_translation('ACYM_PARAMETERS'); ?></div>
22 + <div class="acym__title"><?php echo esc_html(acym_translation('ACYM_PARAMETERS')); ?></div>
19 23 <div class="cell grid-x grid-margin-x margin-y">
20 24 <div class="cell large-6 grid-x">
21 - <label for="acyencoding" class="cell medium-6"><?php echo acym_translation('ACYM_FILE_CHARSET'); ?></label>
25 + <label for="acyencoding" class="cell medium-6"><?php echo esc_html(acym_translation('ACYM_FILE_CHARSET')); ?></label>
22 26 <div class="cell medium-6">
23 27 <?php
24 28 $encodingHelper = new AcyMailing\Helpers\EncodingHelper();
25 29 $default = $encodingHelper->detectEncoding($this->content);
@@ -27,9 +31,9 @@
27 31 $attribs = [
28 32 'data-filename' => $urlEncodedFilename,
29 33 'class' => 'acym__select',
30 34 ];
31 - echo $encodingHelper->charsetField('acyencoding', $default, $attribs);
35 + $encodingHelper->charsetField('acyencoding', $default, $attribs, true);
32 36 ?>
33 37 </div>
34 38 </div>
35 39 <?php if ($this->config->get('require_confirmation')) { ?>
@@ -34,32 +38,33 @@
34 38 </div>
35 39 <?php if ($this->config->get('require_confirmation')) { ?>
36 40 <div class="cell large-6 grid-x">
37 41 <?php
38 - echo acym_switch(
39 - 'import_confirmed_generic',
40 - $this->config->get('import_confirmed', 1),
41 - acym_translation('ACYM_IMPORT_USERS_AS_CONFIRMED')
42 - );
42 + acym_switch([
43 + 'name' => 'import_confirmed_generic',
44 + 'value' => $this->config->get('import_confirmed', 1),
45 + 'label' => acym_translation('ACYM_IMPORT_USERS_AS_CONFIRMED'),
46 + ]);
43 47 ?>
44 48 </div>
45 49 <?php } ?>
46 50 <div class="cell large-6 grid-x">
47 51 <?php
48 - echo acym_switch(
49 - 'import_generate_generic',
50 - $this->config->get('import_generate', 1),
51 - acym_translation('ACYM_GENERATE_NAME').acym_info('ACYM_GENERATE_NAME_DESC')
52 - );
52 + acym_switch([
53 + 'name' => 'import_generate_generic',
54 + 'value' => $this->config->get('import_generate', 1),
55 + 'label' => acym_translation('ACYM_GENERATE_NAME'),
56 + 'tip' => ['textShownInTooltip' => 'ACYM_GENERATE_NAME_DESC'],
57 + ]);
53 58 ?>
54 59 </div>
55 60 <div class="cell large-6 grid-x">
56 61 <?php
57 - echo acym_switch(
58 - 'import_overwrite_generic',
59 - $this->config->get('import_overwrite', 1),
60 - acym_translation('ACYM_OVERWRITE_EXISTING')
61 - );
62 + acym_switch([
63 + 'name' => 'import_overwrite_generic',
64 + 'value' => $this->config->get('import_overwrite', 1),
65 + 'label' => acym_translation('ACYM_OVERWRITE_EXISTING'),
66 + ]);
62 67 ?>
63 68 </div>
64 69 </div>
65 70 </div>
@@ -66,9 +71,9 @@
66 71
67 72 <div class="cell grid-x grid-margin-x margin-top-1">
68 73 <div class="cell hide-for-small-only medium-auto"></div>
69 74 <?php
70 - echo acym_cancelButton(
75 + acym_cancelButton(
71 76 'ACYM_CANCEL',
72 77 '',
73 78 'button medium-6 large-shrink margin-bottom-0'
74 79 );
@@ -75,21 +80,20 @@
75 80
76 81 $entityHelper = new AcyMailing\Helpers\EntitySelectHelper();
77 82 $importHelper = new AcyMailing\Helpers\ImportHelper();
78 83 $modalData = $entityHelper->entitySelect(
79 - 'list',
80 - ['join' => ''],
81 - $entityHelper->getColumnsForList(),
82 - [],
83 - true,
84 - $importHelper->additionalDataUsersImport(true)
84 + [
85 + 'entity' => 'list',
86 + 'columnsToDisplay' => $entityHelper->getColumnsForList(),
87 + 'additionalData' => fn() => $importHelper->displayAdditionalDataUsersImport(true),
88 + ]
85 89 );
86 - echo acym_modal(
90 + acym_modal(
87 91 acym_translation('ACYM_IMPORT_SUBSCRIBERS'),
88 92 $modalData,
89 93 'acym__user__import__add-subscription__modal',
90 - '',
91 - 'class="button margin-bottom-0"'
94 + [],
95 + ['class' => 'button margin-bottom-0']
92 96 );
93 97 ?>
94 98 <div class="cell hide-for-small-only medium-auto"></div>
95 99 </div>