Fix and update note for disabled commenting

This commit is contained in:
Tetrakern 2023-10-29 21:46:28 +01:00
parent 0e7269bac0
commit 0b608db233
4 changed files with 4 additions and 7 deletions

View File

@ -62,7 +62,7 @@ $logout_url = fictioneer_get_logout_url( get_permalink() );
comment_form();
}
} else {
echo '<div class="fictioneer-comments__disabled">' . __( 'Comments are disabled.', 'fictioneer' ) . '</div>';
echo '<div class="fictioneer-comments__disabled">' . __( 'Commenting is disabled.', 'fictioneer' ) . '</div>';
}
// Count all comments regardless of status

View File

@ -151,7 +151,7 @@ function fictioneer_ajax_get_comment_section() {
comment_form( fictioneer_comment_form_args( [], $post_id ), $post_id );
}
} else {
echo '<div class="fictioneer-comments__disabled">' . __( 'Comments are disabled.', 'fictioneer' ) . '</div>';
echo '<div class="fictioneer-comments__disabled">' . __( 'Commenting is disabled.', 'fictioneer' ) . '</div>';
}
// List

View File

@ -156,7 +156,7 @@ if ( ! function_exists( 'fictioneer_comments_ajax_skeleton' ) ) {
<h2 class="fictioneer-comments__title"><div class="shape"></div></h2>
</div>
<?php if ( fictioneer_is_commenting_disabled() ) : ?>
<div class="fictioneer-comments__disabled"><?php _e( 'Comments are disabled.', 'fictioneer' ); ?></div>
<div class="fictioneer-comments__disabled"><?php _e( 'Commenting is disabled.', 'fictioneer' ); ?></div>
<?php else : ?>
<?php if ( get_option( 'fictioneer_enable_oauth' ) || is_user_logged_in() ) : ?>
<div class="comments-skeleton__login"><div class="shape"></div></div>
@ -242,9 +242,6 @@ if ( ! function_exists( 'fictioneer_ajax_list_comments' ) ) {
$list_args = apply_filters( 'fictioneer_filter_comment_list_args', $list_args );
// Start HTML ---> ?>
<?php if ( fictioneer_is_commenting_disabled( $args['post_id'] ) ) : ?>
<div class="fictioneer-comments__disabled"><?php _e( 'Comments are disabled.', 'fictioneer' ); ?></div>
<?php endif; ?>
<ol class="fictioneer-comments__list commentlist">
<?php wp_list_comments( $list_args, $comments ); ?>
</ol>

View File

@ -266,7 +266,7 @@ function fictioneer_rest_get_comment_section( WP_REST_Request $request ) {
// Abort if comments are closed
if ( ! comments_open( $post ) ) {
$data = array( 'error' => __( 'Comments are disabled.', 'fictioneer' ) );
$data = array( 'error' => __( 'Commenting is disabled.', 'fictioneer' ) );
return rest_ensure_response( array( 'data' => $data, 'success' => false ), 403 );
}