#44138 closed enhancement (invalid)
Automatic Message on comment Area mislead visitors
| Reported by: | Marius84 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Comments | Version: | 4.9.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | privacy |
Description
We have no way to change this message on comment Area? “Save my name, email, and website in this browser for the next time I comment.”
So, i don’t request email and website when user left a comment i want to put my personalized message like “Save my name in this browser for the next time I comment.”
On my website i hide the website and email space on comment area. I don't want to request this datas for users when they left a comment.
So why there is no way to change “Save my name, email, and website in this browser for the next time I comment.” with personalized message?
This can mislead visitors thinking that I collect "anonymous" email and website because they are not requested on my site
Change History (4)
#2
@
8 years ago
Hi @SergeyBiryukov where is this more exactly? Everytime i update wordpress i have to do this?
this is not easy for most of the people.
BTW, please close it, i have find the solution Thank you Sergey!
#3
@
8 years ago
- Milestone Awaiting Review
- Resolution → invalid
- Status new → closed
Closing out because this has been solved. @Marius84 for future reference, here is more information about using filter hooks.
#4
in reply to: ↑ 1
@
8 years ago
Replying to SergeyBiryukov:
function wp44138_change_comment_form_cookies_consent( $fields ) {
$consent = empty( $commentercomment_author_email ) ? : ' checked="checked"';
The first line in the function should have
$commenter = wp_get_current_commenter();
isn't it?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi @Marius84, welcome to WordPress Trac!
You could change this message using the
comment_form_default_fieldsfilter:function wp44138_change_comment_form_cookies_consent( $fields ) { $consent = empty( $commenter['comment_author_email'] ) ? '' : ' checked="checked"'; $fields['cookies'] = '<p class="comment-form-cookies-consent">' . '<input id="wp-comment-cookies-consent" name="wp-comment-cookies-consent" type="checkbox" value="yes"' . $consent . ' />' . '<label for="wp-comment-cookies-consent">' . __( 'Your desired text.', 'your-text-domain' ) . '</label>' . '</p>'; return $fields; } add_filter( 'comment_form_default_fields', 'wp44138_change_comment_form_cookies_consent' );