Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions inc/cleantalk-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,10 @@ function apbct_admin__enqueue_scripts($hook)
'notice_when_deleting_user_text' => esc_html__('Warning! Users are deleted without the possibility of restoring them, you can only restore them from a site backup.', 'cleantalk-spam-protect'),
'apbctNoticeDismissSuccess' => esc_html__('Thank you for the review! We strive to make our Anti-Spam plugin better every day.', 'cleantalk-spam-protect'),
'apbctNoticeForceProtectionOn' => esc_html__('This option affects the reflection of the page by checking the user and adds a cookie "apbct_force_protection_check", which serves as an indicator of successful or unsuccessful verification. If the check is successful, it will no longer run.', 'cleantalk-spam-protect'),
'links' => array(
'users_editscreen' => LinkConstructor::buildCleanTalkLink('admin_blacklists_avatar_link', 'blacklists/{TARGET}'),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two values is equal. Why do we need duplicate keys?

Use a single key and please verify the utm preset name is reflecting the logic it used for. (avatar?.. why this word used?)

'comments_editscreen' => LinkConstructor::buildCleanTalkLink('admin_blacklists_avatar_link', 'blacklists/{TARGET}'),
),
);
$data = array_merge($data, ContactsEncoder::getLocalizationText());
wp_localize_script('cleantalk-admin-js', 'ctAdminCommon', $data);
Expand Down Expand Up @@ -616,7 +620,7 @@ function apbct_admin__enqueue_scripts($hook)
'ctTrpAdminLocalize',
\Cleantalk\ApbctWP\CleantalkRealPerson::getLocalizingData()
);
ApbctEnqueue::getInstance()->js('cleantalk-comments-editscreen.js');
ApbctEnqueue::getInstance()->js('cleantalk-comments-editscreen.js', array('cleantalk-admin-js'));
$link = LinkConstructor::buildCleanTalkLink(
'public_comments_page_go_to_cp',
'my',
Expand All @@ -634,7 +638,7 @@ function apbct_admin__enqueue_scripts($hook)
__("Feedback has been sent to %sCleanTalk Dashboard%s.", 'cleantalk-spam-protect'),
$apbct->user_token ? "<a target='_blank' href='$link'>" : '',
$apbct->user_token ? "</a>" : ''
) . ' ' . esc_html__('The service accepts feedback only for requests made no more than 7 or 45 days
) . ' ' . esc_html__('The service accepts feedback only for requests made no more than 7 or 45 days
(if the Extra package is activated) ago.', 'cleantalk-spam-protect'),
'ct_show_check_links' => (bool)$apbct->settings['comments__show_check_links'],
'ct_img_src_new_tab' => plugin_dir_url(__FILE__) . "images/new_window.gif",
Expand All @@ -644,11 +648,11 @@ function apbct_admin__enqueue_scripts($hook)
// USERS page JavaScript
if ( $hook == 'users.php' ) {
ApbctEnqueue::getInstance()->css('cleantalk-icons.css');
ApbctEnqueue::getInstance()->js('cleantalk-users-editscreen.js');
ApbctEnqueue::getInstance()->js('cleantalk-users-editscreen.js', array('cleantalk-admin-js'));
wp_localize_script('cleantalk-users-editscreen-js', 'ctUsersScreen', array(
'spambutton_text' => __("Find spam-users", 'cleantalk-spam-protect'),
'ct_show_check_links' => (bool)$apbct->settings['comments__show_check_links'],
'ct_img_src_new_tab' => plugin_dir_url(__FILE__) . "images/new_window.gif"
'ct_img_src_new_tab' => plugin_dir_url(__FILE__) . "images/new_window.gif",
));
Comment thread
alexander-b-clean marked this conversation as resolved.
}
}
Expand Down
2 changes: 1 addition & 1 deletion js/cleantalk-comments-editscreen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/cleantalk-comments-editscreen.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/cleantalk-users-editscreen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/cleantalk-users-editscreen.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions js/src/cleantalk-comments-editscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jQuery(document).ready(function(){
jQuery('.column-author a, .comment-author a').each(function(){
var ct_curr_str = jQuery(this).html();
if(ct_is_email(ct_curr_str) != -1 || ct_is_ip(ct_curr_str) != -1){
ct_curr_str += '?utm_source=admin_side&utm_medium=comments&utm_content=avatar&utm_campaign=apbct_links';
jQuery(this).after('&nbsp;<a href="https://cleantalk.org/blacklists/'+ct_curr_str+'" target="_blank" title="https://cleantalk.org/blacklists/'+ct_curr_str+'" class="ct_link_new_tab"><img src="'+ctCommentsScreen.ct_img_src_new_tab+'"></a>');
var ct_url = ctAdminCommon.links.comments_editscreen.replace('{TARGET}', ct_curr_str);
jQuery(this).after('&nbsp;<a href="'+ct_url+'" target="_blank" title="'+ct_url+'" class="ct_link_new_tab"><img src="'+ctCommentsScreen.ct_img_src_new_tab+'"></a>');
Comment thread
alexander-b-clean marked this conversation as resolved.
}
});

Expand Down
6 changes: 4 additions & 2 deletions js/src/cleantalk-users-editscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jQuery(document).ready(function(){
jQuery('.column-email a').each(function(){
var ct_curr_str = jQuery(this).html();
if( ct_is_email(ct_curr_str) !== -1 ){
ct_curr_str += '?utm_source=admin_side&utm_medium=comments&utm_content=avatar&utm_campaign=apbct_links';
jQuery(this).after('&nbsp;<a href="https://cleantalk.org/blacklists/'+ct_curr_str+'" target="_blank" title="https://cleantalk.org/blacklists/'+ct_curr_str+'" class="ct_link_new_tab"><img src="'+ctUsersScreen.ct_img_src_new_tab+'"></a>');


var ct_url = ctAdminCommon.links.users_editscreen.replace('{TARGET}', ct_curr_str);
jQuery(this).after('&nbsp;<a href="'+ct_url+'" target="_blank" title="'+ct_url+'" class="ct_link_new_tab"><img src="'+ctUsersScreen.ct_img_src_new_tab+'"></a>');
Comment thread
alexander-b-clean marked this conversation as resolved.
}
});

Expand Down
Loading
Loading