render_wrapper( 'post-comment', $content ); } /** * Custom Comment Form Fields */ public function custom_comment_form_fields( $fields ) { if ( isset( $fields['cookies'] ) ) { $commenter = wp_get_current_commenter(); $consent = empty( $commenter['comment_author_email'] ) ? '' : 'checked'; $fields['cookies'] = sprintf( '', sprintf( '%s', $consent, sprintf( '', $this->render_icon_element( $this->attribute['st_form_checkbox_icon'] ) ) ), sprintf( '', esc_html__( 'Save my name, email, and website in this browser for the next time I comment.', 'jeg-elementor-kit' ) ) ); } remove_filter( 'comment_form_default_fields', array( $this, 'custom_comment_form_fields' ) ); return $fields; } }