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/Partial/forms/header.php +58 -29 10.11.1 → 11.1.0 View file →
@@ -1,36 +1,37 @@
1 -<div id="acym_fulldiv_<?php echo $form->form_tag_name; ?>" class="acym__subscription__form__header acym__subscription__form-erase full-width">
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 +<div id="acym_fulldiv_<?php echo esc_attr($form->form_tag_name); ?>" class="acym__subscription__form__header acym__subscription__form-erase full-width">
2 6 <?php
3 7 if ($edition) {
4 - echo '<form action="#" onsubmit="return false;" id="'.$form->form_tag_name.'">';
8 + echo '<form action="#" onsubmit="return false;" id="'.esc_attr($form->form_tag_name).'">';
5 9 } else {
6 - $cookieExpirationAttr = empty($form->settings['cookie']['cookie_expiration']) ? 'acym-data-cookie="1"'
7 - : 'acym-data-cookie="'.$form->settings['cookie']['cookie_expiration'].'"';
8 - echo '<form
9 - acym-data-id="'.$form->id.'" '.$cookieExpirationAttr.'
10 - action="'.$form->form_tag_action.'"
11 - id="'.$form->form_tag_name.'"
12 - name="'.$form->form_tag_name.'"
13 - enctype="multipart/form-data"
14 - onsubmit="return submitAcymForm(\'subscribe\',\''.$form->form_tag_name.'\', \'acymSubmitSubForm\');">';
10 + $cookieExpiration = empty($form->settings['cookie']['cookie_expiration']) ? '1' : $form->settings['cookie']['cookie_expiration'];
11 + echo '<form
12 + acym-data-id="'.esc_attr($form->id).'"
13 + acym-data-cookie="'.intval($cookieExpiration).'"
14 + action="'.esc_url($form->form_tag_action).'"
15 + id="'.esc_attr($form->form_tag_name).'"
16 + name="'.esc_attr($form->form_tag_name).'"
17 + aria-label="'.esc_attr(acym_translation('ACYM_SUBSCRIPTION')).'"
18 + enctype="multipart/form-data"
19 + onsubmit="return submitAcymForm(\'subscribe\',\''.esc_attr($form->form_tag_name).'\', \'acymSubmitSubForm\');">';
15 20 }
16 - $files = [
17 - 0 => $form->settings['style']['position'] == 'button-right' ? 'fields' : 'button',
18 - 1 => $form->settings['style']['position'] == 'button-right' ? 'button' : 'fields',
19 - ];
21 + include acym_getPartial('forms', 'fields');
22 + include acym_getPartial('forms', 'button');
23 + include acym_getPartial('forms', 'hidden_params');
20 24
21 - include acym_getPartial('forms', $files[0]);
22 - include acym_getPartial('forms', $files[1]);
23 - include acym_getPartial('forms', 'hidden_params');
25 + echo '</form>';
24 26 ?>
25 - </form>
26 27 </div>
27 28 <style>
28 - <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>.acym__subscription__form__header{
29 - <?php echo !empty($form->settings['style']['size']['width'])? 'width: '.$form->settings['style']['size']['width'].'%': ''; ?>;
30 - height: <?php echo $form->settings['style']['size']['height']; ?>px;
31 - background-color: <?php echo $form->settings['style']['background_color']; ?>;
32 - color: <?php echo $form->settings['style']['text_color']; ?> !important;
29 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header{
30 + <?php echo esc_html(!empty($form->settings['style']['size']['width'])? 'width: '.$form->settings['style']['size']['width'].'%': ''); ?>;
31 + height: <?php echo esc_html($form->settings['style']['size']['height']); ?>px;
32 + background-color: <?php echo esc_html($form->settings['style']['background_color']); ?>;
33 + color: <?php echo esc_html($form->settings['style']['text_color']); ?> !important;
33 34 padding: .5rem;
34 35 z-index: 999999;
35 36 text-align: center;
36 37 display: flex;
@@ -39,14 +40,14 @@
39 40 margin-left: auto;
40 41 margin-right: auto;
41 42 }
42 43
43 - <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>.acym__subscription__form__header .responseContainer{
44 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .responseContainer{
44 45 margin-bottom: 0 !important;
45 46 padding: .4rem !important;
46 47 }
47 48
48 - <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>.acym__subscription__form__header <?php echo '#'.$form->form_tag_name; ?>{
49 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header <?php echo '#'.esc_html($form->form_tag_name); ?>{
49 50 margin: 0;
50 51 display: flex;
51 52 justify-content: center;
52 53 align-items: center
@@ -51,22 +52,50 @@
51 52 justify-content: center;
52 53 align-items: center
53 54 }
54 55
55 - <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>.acym__subscription__form__header .acym__subscription__form__fields, <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>.acym__subscription__form__header .acym__subscription__form__button{
56 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields, <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__button{
56 57 display: flex;
57 58 justify-content: center;
58 59 align-items: center
59 60 }
60 61
61 - <?php echo '#acym_fulldiv_'.$form->form_tag_name; ?>
62 + <?php if (($form->settings['style']['position'] ?? '') !== 'button-right') { ?>
63 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__button{
64 + order: -1;
65 + }
66 + <?php } ?>
67 +
68 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>
62 69 .acym__users__creation__fields__title{
63 70 margin: 0.5rem
64 71 }
65 72
73 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header,
74 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header <?php echo '#'.esc_html($form->form_tag_name); ?>,
75 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields{
76 + flex-wrap: wrap;
77 + max-width: 100%;
78 + }
79 +
80 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header{
81 + height: auto;
82 + min-height: <?php echo esc_html($form->settings['style']['size']['height']); ?>px;
83 + }
84 +
85 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield{
86 + width: auto;
87 + }
88 +
89 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
90 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield select,
91 + <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name); ?>.acym__subscription__form__header .acym__subscription__form__fields .onefield textarea{
92 + width: auto;
93 + max-width: 220px;
94 + }
66 95 </style>
67 96 <?php if (!$edition) { ?>
68 97 <script type="text/javascript">
69 - document.body.prepend(document.querySelector('#acym_fulldiv_<?php echo $form->form_tag_name; ?>'));
98 + document.body.prepend(document.querySelector('#acym_fulldiv_<?php echo esc_html($form->form_tag_name); ?>'));
70 99 </script>
71 100 <?php include acym_getPartial('forms', 'cookie');
72 101 } ?>