PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / 11.1.1
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress v11.1.1
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/termspolicy.php +0 -70 11.0.2 → 11.1.1 View file →
@@ -1,70 +1,0 @@
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\Helpers\SecurityHelper;
6 -
7 -$termspolicy = $form->settings['termspolicy'] ?? [];
8 -
9 -if (empty($termspolicy['privacy_type']) || $termspolicy['privacy_type'] === 'article') {
10 - $privacyURL = acym_getArticleURL((int)($termspolicy['privacy'] ?? 0), false, 'ACYM_PRIVACY_POLICY');
11 -} elseif ($termspolicy['privacy_type'] === 'url') {
12 - $privacyURL = $termspolicy['privacy_url'] ?? '';
13 -} else {
14 - $privacyURL = '';
15 -}
16 -
17 -if (empty($termspolicy['terms_type']) || $termspolicy['terms_type'] === 'article') {
18 - $termsURL = acym_getArticleURL((int)($termspolicy['termscond'] ?? 0), false, 'ACYM_TERMS_CONDITIONS');
19 -} elseif ($termspolicy['terms_type'] === 'url') {
20 - $termsURL = $termspolicy['terms_url'] ?? '';
21 -} else {
22 - $termsURL = '';
23 -}
24 -
25 -if (!empty($termspolicy['privacy_type']) && $termspolicy['privacy_type'] === 'url' && !empty($privacyURL)) {
26 - $privacyURL = '<a href="'.esc_url($privacyURL).'" target="_blank">'.esc_html(acym_translation('ACYM_PRIVACY_POLICY')).'</a>';
27 -}
28 -
29 -if (!empty($termspolicy['terms_type']) && $termspolicy['terms_type'] === 'url' && !empty($termsURL)) {
30 - $termsURL = '<a href="'.esc_url($termsURL).'" target="_blank">'.esc_html(acym_translation('ACYM_TERMS_CONDITIONS')).'</a>';
31 -}
32 -
33 -
34 -if (empty($termsURL) && empty($privacyURL)) {
35 - $termslink = '';
36 -} elseif (empty($privacyURL)) {
37 - $termslink = acym_translationSprintf('ACYM_I_AGREE_TERMS', $termsURL);
38 -} elseif (empty($termsURL)) {
39 - $termslink = acym_translationSprintf('ACYM_I_AGREE_PRIVACY', $privacyURL);
40 -} else {
41 - $termslink = acym_translationSprintf('ACYM_I_AGREE_BOTH', $termsURL, $privacyURL);
42 -}
43 -
44 -if (!empty($termslink)) {
45 - echo '<div class="acym__subscription__form__termscond">';
46 - echo '<div class="onefield fieldacyterms" id="field_terms_'.esc_attr($form->form_tag_name).'">';
47 - echo '<label for="mailingdata_terms_'.esc_attr($form->form_tag_name).'">';
48 - echo '<input id="mailingdata_terms_'.esc_attr($form->form_tag_name).'" class="checkbox" type="checkbox" name="terms" title="'.esc_attr(
49 - acym_translation('ACYM_TERMS_CONDITIONS')
50 - ).'"/> ';
51 - echo wp_kses(
52 - $termslink,
53 - SecurityHelper::ALLOWED_HTML_TERMS
54 - );
55 - echo '</label>';
56 - echo '</div>';
57 - ?>
58 -
59 - <style>
60 - .acym__subscription__form__header .acym__subscription__form__termscond,
61 - .acym__subscription__form__footer .acym__subscription__form__termscond{
62 - max-width: 250px;
63 - }
64 -
65 - <?php echo '#acym_fulldiv_'.esc_html($form->form_tag_name).' '; ?>.acym__subscription__form__fields .acym__subscription__form__termscond input[type="checkbox"]{
66 - margin-top: 0 !important;
67 - }
68 - </style>
69 - </div>
70 -<?php } ?>