Merge pull request #588 from MarieComet/master
add function exists check in custom-comments.php Thx @MarieComet for tracking and fixing this!
This commit is contained in:
commit
6a11da47c6
|
@ -15,6 +15,9 @@ add_filter( 'comment_form_default_fields', 'understrap_bootstrap_comment_form_fi
|
||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'understrap_bootstrap_comment_form_fields' ) ) {
|
||||||
|
|
||||||
function understrap_bootstrap_comment_form_fields( $fields ) {
|
function understrap_bootstrap_comment_form_fields( $fields ) {
|
||||||
$commenter = wp_get_current_commenter();
|
$commenter = wp_get_current_commenter();
|
||||||
$req = get_option( 'require_name_email' );
|
$req = get_option( 'require_name_email' );
|
||||||
|
@ -34,6 +37,7 @@ function understrap_bootstrap_comment_form_fields( $fields ) {
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
} // endif function_exists( 'understrap_bootstrap_comment_form_fields' )
|
||||||
|
|
||||||
add_filter( 'comment_form_defaults', 'understrap_bootstrap_comment_form' );
|
add_filter( 'comment_form_defaults', 'understrap_bootstrap_comment_form' );
|
||||||
|
|
||||||
|
@ -44,6 +48,9 @@ add_filter( 'comment_form_defaults', 'understrap_bootstrap_comment_form' );
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( ! function_exists( 'understrap_bootstrap_comment_form' ) ) {
|
||||||
|
|
||||||
function understrap_bootstrap_comment_form( $args ) {
|
function understrap_bootstrap_comment_form( $args ) {
|
||||||
$args['comment_field'] = '<div class="form-group comment-form-comment">
|
$args['comment_field'] = '<div class="form-group comment-form-comment">
|
||||||
<label for="comment">' . _x( 'Comment', 'noun', 'understrap' ) . ( ' <span class="required">*</span>' ) . '</label>
|
<label for="comment">' . _x( 'Comment', 'noun', 'understrap' ) . ( ' <span class="required">*</span>' ) . '</label>
|
||||||
|
@ -52,3 +59,4 @@ function understrap_bootstrap_comment_form( $args ) {
|
||||||
$args['class_submit'] = 'btn btn-secondary'; // since WP 4.1.
|
$args['class_submit'] = 'btn btn-secondary'; // since WP 4.1.
|
||||||
return $args;
|
return $args;
|
||||||
}
|
}
|
||||||
|
} // endif function_exists( 'understrap_bootstrap_comment_form' )
|
||||||
|
|
Reference in New Issue