I read the supposed explanation posted on their blog, and came away unenlightened.
The following site-specific plugin does nothing (I have enabled it):
<?php
/*
Plugin Name: Akismet Better Privacy Notice
Description: Inform users about what's actually happening with their data
*/
apply_filters(
'akismet_comment_form_privacy_notice_markup',
'<p class="akismet_comment_form_privacy_notice">' .
'Warning: This site uses Akismet to filter spam.' .
' Until or unless I can find a suitable replacement anti-spam solution, this means that' .
' (per their <a href="%s" target="_blank">indemnification document</a>)' .
' <strong>all commenters\' IP addresses will be sent to Automattic, Inc.</strong>,' .
' who may choose to share such with 3rd parties.' .
'<br />If this is unacceptable to you,' .
' I highly recommend using an anonymous proxy or public Wi-Fi connection' .
' when commenting.' .
'</p>'
);
?>
How can I change this privacy message?
I read the supposed explanation posted on their blog, and came away unenlightened.
The following site-specific plugin does nothing (I have enabled it):
<?php
/*
Plugin Name: Akismet Better Privacy Notice
Description: Inform users about what's actually happening with their data
*/
apply_filters(
'akismet_comment_form_privacy_notice_markup',
'<p class="akismet_comment_form_privacy_notice">' .
'Warning: This site uses Akismet to filter spam.' .
' Until or unless I can find a suitable replacement anti-spam solution, this means that' .
' (per their <a href="%s" target="_blank">indemnification document</a>)' .
' <strong>all commenters\' IP addresses will be sent to Automattic, Inc.</strong>,' .
' who may choose to share such with 3rd parties.' .
'<br />If this is unacceptable to you,' .
' I highly recommend using an anonymous proxy or public Wi-Fi connection' .
' when commenting.' .
'</p>'
);
?>
How can I change this privacy message?
Share Improve this question asked Mar 1, 2022 at 2:42 JamesTheAwesomeDudeJamesTheAwesomeDude 1096 bronze badges 2- I am aware that this notice might not technically fulfill the GDPR. That is not an issue, as my jurisdiction of residence isn't under that. I am trying to inform visitors, not satisfy lawyers. – JamesTheAwesomeDude Commented Mar 1, 2022 at 2:44
- That's not how filters work, the second parameter must be the name of a function to call that returns the new/filtered value, not the new value itself. – Tom J Nowell ♦ Commented Mar 1, 2022 at 3:16
1 Answer
Reset to default -1Aha, I finally got it working:
<?php
/*
Plugin Name: Akismet Better Privacy Notice
Description: Inform users about what's actually happening with their data
*/
add_filter (
'akismet_comment_form_privacy_notice_markup', 'better_display_comment_form_privacy_notice'
);
function better_display_comment_form_privacy_notice() {
echo sprintf(
'<p class="akismet_comment_form_privacy_notice">' .
'Warning: This site uses Akismet to filter spam.' .
' Until or unless I can find a suitable replacement anti-spam solution, this means that' .
' (per their <a href="%s" target="_blank">indemnification document</a>)' .
' <strong>all commenters\' IP addresses will be sent to Automattic, Inc.</strong>,' .
' who may choose to share such with 3rd parties.' .
'<br />If this is unacceptable to you,' .
' I highly recommend using an anonymous proxy or public Wi-Fi connection' .
' when commenting.' .
'</p>' ,
'https://akismet.com/privacy/'
);
}
?>