Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'comment_form_default_fields', 'tu_filter_comment_fields', 20 );
- function tu_filter_comment_fields( $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">###CUSTOM TEXT###</label></p>';
- return $fields;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement