<?php



add_filter('comment_form_default_fields', 'glowify_comment_form');



function glowify_comment_form($glowify_fields){

	

    $glowify_fields['author'] = '

        <div class="row comment-form-wrap">

        <div class="col-lg-6 col-12">

            <div class="form-group">
                <input type="text" placeholder="'.esc_attr__('Full Name*', 'glowify-wp').'"  name="author" id="name-cmt" required="required">

            </div>

        </div>

    ';



    $glowify_fields['email'] =  '

        <div class="col-lg-6 col-12">

            <div class="form-group">
                <input type="text" placeholder="'.esc_attr__('Your Email*', 'glowify-wp').'"  name="email" id="email-cmt" required="required">

            </div>

        </div>

    ';



    $glowify_fields['url'] = '

        <div class="col-12">

            <div class="form-group">
                <input type="text" placeholder="'.esc_attr__('Website*', 'glowify-wp').'" name="url" id="website">

            </div>

        </div>

        </div>

        

    ';



    return $glowify_fields;

}





add_filter('comment_form_defaults', 'glowify_comment_default_form');



function glowify_comment_default_form($default_form){



    $default_form['comment_field'] = '

        <div class="row">

            <div class="col-12">

                <div class="comment-message">
                    <textarea placeholder="'.esc_attr__('Write Your Comment*', 'glowify-wp').'" name="comment" rows="6" required="required"></textarea>

                </div>

            </div>

    ';



    $default_form['submit_button'] = '

        </div>
        <button type="submit" class="cs_btn cs_style_1 cs_medium">
           <span>'.esc_html__('Post Comment', 'glowify-wp').'</span>
        </button>

    ';



    $default_form['comment_notes_before'] = esc_html__('Your email address will not be published. Required fields are marked *', 'glowify-wp' );

    $default_form['title_reply'] = esc_html__('Write your opinion', 'glowify-wp');

    $default_form['title_reply_before'] = '<h3 class="cs_comment_reply">';

    $default_form['title_reply_after'] = '</h3>';



    return $default_form;

}





function glowify_move_comment_field_to_bottom( $fields ) {

    $comment_field = $fields['comment'];

    unset( $fields['comment'] );

    $fields['comment'] = $comment_field;

    return $fields;

}



add_filter( 'comment_form_fields', 'glowify_move_comment_field_to_bottom' );