Skip to content

Commit a63545f

Browse files
Merge pull request #782 from CleanTalk/add-readmore-link.ab
Add "Read more" link to cleantalk page
2 parents 0132ded + e41f4d8 commit a63545f

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

inc/cleantalk-settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ function apbct_settings__set_fields()
651651
),
652652
'data__email_check_exist_post' => array(
653653
'title' => __('Show email existence alert when filling in the field', 'cleantalk-spam-protect'),
654-
'description' => __('Checks the email address and shows the result as an icon in the email field before submitting the form. Works for WooCommerce checkout form, FluentForms, Contact Form 7, Gravity Forms, Ninja Forms, WPForms, standard WordPress comment form and registration form.', 'cleantalk-spam-protect'),
654+
'description' => __('Checks the email address and shows the result as an icon in the email field before submitting the form. Works for WooCommerce checkout form, FluentForms, Contact Form 7, Gravity Forms, Ninja Forms, WPForms, standard WordPress comment form and registration form.', 'cleantalk-spam-protect') . ' ' . '<a href="https://cleantalk.org/help/show-email-existence-alert" target="_blank" rel="noopener noreferrer">' . __('Read more', 'cleantalk-spam-protect') . '</a>',
655655
),
656656
),
657657
),

tests/Inc/TestCleantalkSettings.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,18 @@ public function testApbctSettingsSetFieldsBotDetector()
2626
$this->assertArrayHasKey('display', $data_processing_options['bot_detector_state']);
2727
$this->assertArrayNotHasKey('parent', $data_processing_options['exclusions__bot_detector']);
2828
}
29+
30+
public function testApbctSettingsSetFieldsEmailCheckReadMore()
31+
{
32+
$fields = apbct_settings__set_fields();
33+
34+
$this->assertArrayHasKey('data_processing', $fields);
35+
36+
$data_processing_options = $fields['data_processing']['fields'];
37+
38+
$this->assertArrayHasKey('data__email_check_exist_post', $data_processing_options);
39+
$this->assertArrayHasKey('description', $data_processing_options['data__email_check_exist_post']);
40+
$this->assertStringContainsString('https://cleantalk.org/help/show-email-existence-alert', $data_processing_options['data__email_check_exist_post']['description']);
41+
$this->assertStringContainsString('Read more', $data_processing_options['data__email_check_exist_post']['description']);
42+
}
2943
}

0 commit comments

Comments
 (0)