| 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="spam_test_zone" class="cell"> |
| 6 |
<h6 class="acym__title acym__title__secondary"><?php echo esc_html(acym_translation('ACYM_SAFE_CHECK')); |
| 7 |
acym_info(['textShownInTooltip' => 'ACYM_INTRO_SAFE_CHECK']); ?></h6> |
| 8 |
<p class="margin-bottom-1"><?php echo esc_html(acym_translation('ACYM_SAFE_CHECK_DESC')); ?></p> |
| 9 |
<?php |
| 10 |
if (count($data['emails_to_test']) > 1) { ?> |
| 11 |
<div class="margin-bottom-1 cell grid-x"> |
| 12 |
<p class="cell"> |
| 13 |
<?php echo esc_html(acym_translation('ACYM_SELECT_VERSION_TO_TEST')); ?> |
| 14 |
</p> |
| 15 |
<div class="cell"> |
| 16 |
<?php acym_select($data['emails_to_test'], 'mail_id_test', $data['id'], ['class' => 'acym__select'], 'id', 'subject', null, false, true); ?> |
| 17 |
</div> |
| 18 |
</div> |
| 19 |
<?php } ?> |
| 20 |
<div class="grid-x align-center"> |
| 21 |
<div class="cell"> |
| 22 |
<?php |
| 23 |
?> |
| 24 |
</div> |
| 25 |
<?php |
| 26 |
$classContainer = 'is-hidden'; |
| 27 |
if (!empty($data['upgrade'])) { |
| 28 |
$classContainer = 'acym__campaigns__tests__starter'; |
| 29 |
} |
| 30 |
if ($data['isDemo']) { |
| 31 |
$classContainer = 'acym__campaigns__tests__demo acym__campaigns__tests__starter'; |
| 32 |
} |
| 33 |
?> |
| 34 |
<div class="cell grid-x <?php echo esc_attr($classContainer); ?>" id="safe_check_results"> |
| 35 |
<div class="cell grid-x acym_vcenter" id="check_words"> |
| 36 |
<div class="cell small-10"><?php echo esc_html(acym_translation('ACYM_TESTS_SAFE_CONTENT')); ?></div> |
| 37 |
<div class="cell small-2 text-center acym_icon_container"> |
| 38 |
<?php |
| 39 |
if ($data['isDemo']) { |
| 40 |
echo '<i class="acymicon-check-circle acym_icon_green"></i>'; |
| 41 |
} elseif (empty($data['upgrade'])) { |
| 42 |
echo '<i></i>'; |
| 43 |
} else { |
| 44 |
acym_tooltip( |
| 45 |
[ |
| 46 |
'hoveredText' => '<i class="acymicon-question-circle-o"></i>', |
| 47 |
'textShownInTooltip' => acym_translation('ACYM_NEED_PRO_VERSION'), |
| 48 |
] |
| 49 |
); |
| 50 |
} |
| 51 |
?> |
| 52 |
</div> |
| 53 |
</div> |
| 54 |
<div class="cell acym_check_results"></div> |
| 55 |
|
| 56 |
<div class="cell grid-x acym_vcenter" id="check_links"> |
| 57 |
<div class="cell small-10"><?php echo esc_html(acym_translation('ACYM_TESTS_LINKS')); ?></div> |
| 58 |
<div class="cell small-2 text-center acym_icon_container"> |
| 59 |
<?php |
| 60 |
if ($data['isDemo']) { |
| 61 |
echo '<i class="acymicon-check-circle acym_icon_green"></i>'; |
| 62 |
} elseif (empty($data['upgrade'])) { |
| 63 |
echo '<i></i>'; |
| 64 |
} else { |
| 65 |
acym_tooltip( |
| 66 |
[ |
| 67 |
'hoveredText' => '<i class="acymicon-question-circle-o"></i>', |
| 68 |
'textShownInTooltip' => acym_translation('ACYM_NEED_PRO_VERSION'), |
| 69 |
] |
| 70 |
); |
| 71 |
} |
| 72 |
?> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
<div class="cell acym_check_results"></div> |
| 76 |
|
| 77 |
<?php |
| 78 |
$spamTestRow = ''; |
| 79 |
$dataModal = ''; |
| 80 |
if ($data['isDemo']) { |
| 81 |
$iconSpamTest = '<i class="acymicon-check-circle acym_icon_green"></i>'; |
| 82 |
} elseif (acym_level(ACYM_ENTERPRISE)) { |
| 83 |
$iconSpamTest = '<i></i>'; |
| 84 |
} else { |
| 85 |
ob_start(); |
| 86 |
acym_tooltip( |
| 87 |
[ |
| 88 |
'hoveredText' => '<i class="acymicon-question-circle-o"></i>', |
| 89 |
'textShownInTooltip' => acym_translation('ACYM_NEED_ENTERPRISE_VERSION'), |
| 90 |
] |
| 91 |
); |
| 92 |
$iconSpamTest = ob_get_clean(); |
| 93 |
} |
| 94 |
if (!$data['isDemo']) { |
| 95 |
$spamTestRow = '<div class="cell grid-x acym_vcenter" id="check_spam" data-iframe="spamtestpopup" data-iframe-class="acym__iframe_spamtest"> |
| 96 |
<div class="cell small-10">'.esc_html(acym_translation('ACYM_TESTS_SPAM')).'</div> |
| 97 |
<div class="cell small-2 text-center acym_icon_container">'.$iconSpamTest.'</div> |
| 98 |
</div>'; |
| 99 |
} |
| 100 |
|
| 101 |
if ($data['isDemo']) { |
| 102 |
$dataModal = '<img src="'.ACYM_IMAGES.'demo/spam_test.png">'; |
| 103 |
$spamTestRow = '<div class="cell grid-x acym_vcenter" id="check_spam" data-open="spamtestpopup"> |
| 104 |
<div class="cell small-10">'.esc_html(acym_translation('ACYM_TESTS_SPAM')).'</div> |
| 105 |
<div class="cell small-2 text-center acym_icon_container">'.$iconSpamTest.'</div> |
| 106 |
</div>'; |
| 107 |
} |
| 108 |
|
| 109 |
acym_modal( |
| 110 |
$spamTestRow, |
| 111 |
$dataModal, |
| 112 |
'spamtestpopup', |
| 113 |
['data-reveal-larger' => true], |
| 114 |
[], |
| 115 |
false |
| 116 |
); |
| 117 |
?> |
| 118 |
<div class="cell acym_check_results"></div> |
| 119 |
<div class="cell text-center <?php echo !$data['isDemo'] ? 'is-hidden' : ''; ?>" id="acym_spam_test_details"> |
| 120 |
<button type="button" class="button button-secondary"><?php echo esc_html(acym_translation('ACYM_DETAILS')); ?></button> |
| 121 |
</div> |
| 122 |
</div> |
| 123 |
<?php |
| 124 |
if (!acym_level(ACYM_ENTERPRISE)) { |
| 125 |
$visibilityClass = ''; |
| 126 |
if (acym_level(ACYM_ESSENTIAL)) { |
| 127 |
$visibilityClass = ' is-hidden'; |
| 128 |
} |
| 129 |
echo '<div class="cell grid-x grid-margin-x margin-top-2 align-center acym__campaigns__test__pro'.esc_attr($visibilityClass).'">'; |
| 130 |
echo '<a href="'.esc_url(ACYM_DOCUMENTATION).'main-pages/campaigns/tests" target="_blank" class="button button-secondary cell shrink">'; |
| 131 |
echo esc_html(acym_translation('ACYM_SEE_MORE')); |
| 132 |
echo '</a>'; |
| 133 |
if (acym_level(ACYM_ESSENTIAL)) { |
| 134 |
$visibilityClass = ' is-hidden'; |
| 135 |
acym_displayButtonGetProVersion('cell shrink', 'ACYM_GET_ENTERPRISE_VERSION'); |
| 136 |
} else { |
| 137 |
acym_displayButtonGetProVersion(); |
| 138 |
} |
| 139 |
echo '</div>'; |
| 140 |
} |
| 141 |
?> |
| 142 |
</div> |
| 143 |
</div> |
| 144 |
|