diff --git a/comments.php b/comments.php index 610d08a..9b1826e 100644 --- a/comments.php +++ b/comments.php @@ -24,7 +24,8 @@ + if ( have_comments() ) : + ?>

' . get_the_title() . '' + '' . esc_html( get_the_title() ) . '' ); } else { printf( // WPCS: XSS OK. @@ -49,35 +50,99 @@
    new ThemeWPUGPH_Comments(), - 'style' => 'ol', - 'short_ping' => true, - 'avatar_size' => 50, - ) ); + wp_list_comments( + array( + 'walker' => new ThemeWPUGPH_Comments(), + 'style' => 'ol', + 'short_ping' => true, + 'avatar_size' => 50, + ) + ); ?>
- + // If comments are closed and there are comments, let's leave a little note, shall we? + if ( ! comments_open() ) : + ?>

- 'uk-button uk-button-primary', - 'comment_field' => '

', - 'fields' => array( - 'author' => '

' . ' ' . ( $req ? '*' : '' ) . '

', - 'email' => '

' . ( $req ? '*' : '' ) . '

', - 'url' => '

' . '

', - ), - 'submit_button' => '', - )); + $field_required = $req ? 'required' : ''; + + // Comment field. + $comment_label = _x( 'Comment', 'noun', 'themewpugph' ); + $comment_field = << + +
+ +
+ +UIKIT3; + + // Author field. + $author_label = __( 'Name', 'themewpugph' ) . ( $req ? '*' : '' ); + $author_value = esc_attr( $commenter['comment_author'] ); + $author_field = << + +
+ +
+ +UIKIT3; + + // Email field. + $email_label = __( 'Email', 'themewpugph' ) . ( $req ? '*' : '' ); + $email_value = esc_attr( $commenter['comment_author_email'] ); + $email_field = << + +
+ +
+ +UIKIT3; + + // URL field. + $url_label = __( 'Website', 'themewpugph' ); + $url_value = esc_attr( $commenter['comment_author_url'] ); + $url_field = << + +
+ +
+ +UIKIT3; + + comment_form( + array( + 'class_form' => 'uk-form-stacked', + 'class_submit' => 'uk-button uk-button-primary', + 'comment_field' => $comment_field, + 'fields' => array( + 'author' => $author_field, + 'email' => $email_field, + 'url' => $url_field, + ), + 'submit_button' => '', + ) + ); ?> diff --git a/scss/_import-mixins.scss b/scss/_import-mixins.scss index e69de29..3ebb93e 100644 --- a/scss/_import-mixins.scss +++ b/scss/_import-mixins.scss @@ -0,0 +1,3 @@ +@mixin hook-form { + border: 1px solid $global-muted-color; +} \ No newline at end of file diff --git a/scss/variables.scss b/scss/variables.scss index 8894677..a26a1b6 100644 --- a/scss/variables.scss +++ b/scss/variables.scss @@ -82,7 +82,7 @@ $global-danger-background: #f0506e !default; // $global-border-width: 1px !default; -$global-border: #e5e5e5 !default; +$global-border: $global-muted-color !default; // // Box-Shadows