Code not being applied
-
Hi,
I have, what I’m pretty sure is, the correct code to change the standard blog comment form checkbox text, “Save my name, email, and website in this browser for the next time I comment.” to custom text, but it seems the snippet is not being applied. This is the code I am using:
add_filter( 'comment_form_default_fields', 'tu_comment_form_change_cookies_consent' ); function tu_comment_form_change_cookies_consent( $fields ) { $commenter = wp_get_current_commenter(); $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">Please, tick this box to give us permission to contact you by email</label></p>'; return $fields; }
Thanks,
Tim
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Code not being applied’ is closed to new replies.