-
AuthorPosts
-
June 5, 2018 at 4:13 pm #967292
Hi there,
how can I translate the error message “Error: You must agree to our privacy policy to comment on this site…” of privacy policy message in comment form that appears in a new window when not checked? Tried via Loco translate plugin, but there is no such error message.
Thank you for your kind hep in advance.
Best regards,
SophieJune 7, 2018 at 5:23 pm #969703Hey Sophie,
Thank you for using our theme.
The text is located in enfold\includes\helper-privacy.php line 280.
$error_message = apply_filters( 'avf_privacy_comment_checkbox_error_message', __( 'Error: You must agree to our privacy policy to comment on this site...' , 'avia_framework' ) );
Actually it should be recognised by translation plugins.
But you can also use the filter to change it.
If you need assistance in using the filter let us know.
Best regards,
GünterJune 7, 2018 at 5:52 pm #969714Hi Günter,
thank you for your kind message. I am using Enfold child theme, how to solve with Enfold child and the above php file?
Thank you for your help.
Best regards,
SophieJune 7, 2018 at 6:02 pm #969719Hi,
If you place re-create \includes\helper-privacy.php in your child theme and edit there it should work.
Best regards,
Jordan ShannonJune 7, 2018 at 8:20 pm #969767Hi Jordan,
thanks for your help. I created an \includes\helper-privacy.php file in Enfold child theme and changed the code as per the a/m, but that does not work. It only works in Enfold parent theme.
Any idea how to solve in child theme? Thank you in advance.
Kind regards,
SophieJune 10, 2018 at 11:30 am #970732Hi Sophie,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaJune 10, 2018 at 5:09 pm #970800Hi Victoria,
yes sure, please kindly find the login details in private content box. Thank you for your kind efforts in advance.
Wish for you a nice day!
Best regards,
SophieJune 10, 2018 at 7:25 pm #970850Hi,
I added the filter code to your enfold child functions.php
add_filter('avf_privacy_comment_checkbox_error_message', 'avia_privacy_comment_checkbox_error_message', 10, 1); function avia_privacy_comment_checkbox_error_message($message) { $url = htmlspecialchars($_SERVER['HTTP_REFERER']); return "Fehler: Sie müssen unserer Datenschutzerklärung zustimmen, um einen Kommentar schreiben zu können. <a href='$url'>Zurück zu den Kommentaren</a>."; }
You can replace the text with a custom error message :)
I recommend to delete the helper-privacy.php from the child theme folder because it’s not required.Best regards,
DudeJune 10, 2018 at 7:32 pm #970859Hi Dude,
thank you so much for your help. Awesome, that is working fine :-) ! Just one thing: Can you please remove the link with my URL in the brackets in your a/m thread? Thank you in advance.
Kind regards,
SophieJune 10, 2018 at 8:04 pm #970867Hi,
Sure :) – I’ll close this thread now.
Best regards,
Dude -
AuthorPosts
- The topic ‘Translation of error box message | privacy policy message in comment form’ is closed to new replies.