Skip to content

Commit f53f261

Browse files
committed
Fix. EmailEncoder. Make decoding works on settings page even if the options is disabled #2.
1 parent a6fcdc0 commit f53f261

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Cleantalk/Antispam/EmailEncoder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ protected function init()
8282

8383
$this->registerHookHandler();
8484

85+
add_action('wp_ajax_nopriv_apbct_decode_email', array($this, 'ajaxDecodeEmailHandler'));
86+
add_action('wp_ajax_apbct_decode_email', array($this, 'ajaxDecodeEmailHandler'));
87+
8588
if ( ! $apbct->settings['data__email_decoder'] ) {
8689
return;
8790
}
@@ -90,9 +93,6 @@ protected function init()
9093

9194
$this->encryption_is_available = function_exists('openssl_encrypt') && function_exists('openssl_decrypt');
9295

93-
add_action('wp_ajax_nopriv_apbct_decode_email', array($this, 'ajaxDecodeEmailHandler'));
94-
add_action('wp_ajax_apbct_decode_email', array($this, 'ajaxDecodeEmailHandler'));
95-
9696
// Excluded request
9797
if ($this->isExcludedRequest()) {
9898
return;

0 commit comments

Comments
 (0)