[wp-trac] [WordPress Trac] #44138: Automatic Message on comment Area mislead visitors

WordPress Trac noreply at wordpress.org
Fri May 18 02:23:07 UTC 2018


#44138: Automatic Message on comment Area mislead visitors
-------------------------+------------------------------
 Reporter:  Marius84     |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Comments     |     Version:  4.9.6
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  privacy
-------------------------+------------------------------
Changes (by SergeyBiryukov):

 * focuses:   => privacy
 * component:  General => Comments


Comment:

 Hi @Marius84, welcome to WordPress Trac!

 > 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.”

 You could change this message using the `comment_form_default_fields`
 filter:
 {{{
 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' );
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44138#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list