From 00c9709fd9763542e848f6278db8ba26af5c9886 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 15 Oct 2018 23:46:42 +0200 Subject: Initial commit. --- inc/custom-comments.php | 71 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 inc/custom-comments.php (limited to 'inc/custom-comments.php') diff --git a/inc/custom-comments.php b/inc/custom-comments.php new file mode 100644 index 0000000..c4aa7c7 --- /dev/null +++ b/inc/custom-comments.php @@ -0,0 +1,71 @@ + '
' . + '
', + 'email' => '
' . + '
', + 'url' => '
' . + '
', + 'cookies' => '', + ); + + return $fields; + } +} // endif function_exists( 'understrap_bootstrap_comment_form_fields' ) + +add_filter( 'comment_form_defaults', 'understrap_bootstrap_comment_form' ); + +/** + * Builds the form. + * + * @param string $args Arguments for form's fields. + * + * @return mixed + */ + +if ( ! function_exists( 'understrap_bootstrap_comment_form' ) ) { + + function understrap_bootstrap_comment_form( $args ) { + $args['comment_field'] = '
+
+ + +
+
'; + $args['class_submit'] = 'btn btn-secondary'; // since WP 4.1. + return $args; + } +} // endif function_exists( 'understrap_bootstrap_comment_form' ) -- cgit v1.2.3