Nelle impostazioni, se ti riferisci al "Gli utenti devono essere registrati e fare il login per poter inviare commenti", ti confermo che è disabilitato. Credo che invece una traccia sia in questo codice (parte del comment-template.php). Non so leggere bene il PHP, ma mi sembra di capire che all'inizio ci siano delle condizioni if-user-logged-in, mentre alla fine le parti submit_field e submit_button potrebbero essere invertite?
:
Codice PHP:
<div id="respond" class="comment-respond">
<?php
echo $args['title_reply_before'];
comment_form_title( $args['title_reply'], $args['title_reply_to'] );
echo $args['cancel_reply_before'];
cancel_comment_reply_link( $args['cancel_reply_link'] );
echo $args['cancel_reply_after'];
echo $args['title_reply_after'];
if ( get_option( 'comment_registration' ) && !is_user_logged_in() ) :
echo $args['must_log_in'];
do_action( 'comment_form_must_log_in_after' );
else : ?>
<form action="<?php echo esc_url( $args['action'] ); ?>" method="post" id="<?php echo esc_attr( $args['id_form'] ); ?>" class="<?php echo esc_attr( $args['class_form'] ); ?>"<?php echo $html5 ? ' novalidate' : ''; ?>>
<?php do_action( 'comment_form_top' );
if ( is_user_logged_in() ) :
echo apply_filters( 'comment_form_logged_in', $args['logged_in_as'], $commenter, $user_identity );
do_action( 'comment_form_logged_in_after', $commenter, $user_identity );
else :
echo $args['comment_notes_before'];
endif;
// Prepare an array of all fields, including the textarea
$comment_fields = array( 'comment' => $args['comment_field'] ) + (array) $args['fields'];
$comment_fields = apply_filters( 'comment_form_fields', $comment_fields );
// Get an array of field names, excluding the textarea
$comment_field_keys = array_diff( array_keys( $comment_fields ), array( 'comment' ) );
// Get the first and the last field name, excluding the textarea
$first_field = reset( $comment_field_keys );
$last_field = end( $comment_field_keys );
foreach ( $comment_fields as $name => $field ) {
if ( 'comment' === $name ) {
echo apply_filters( 'comment_form_field_comment', $field );
echo $args['comment_notes_after'];
} elseif ( ! is_user_logged_in() ) {
if ( $first_field === $name ) {
do_action( 'comment_form_before_fields' );
}
echo apply_filters( "comment_form_field_{$name}", $field ) . "\n";
if ( $last_field === $name ) {
do_action( 'comment_form_after_fields' );
}
}
}
$submit_button = sprintf(
$args['submit_button'],
esc_attr( $args['name_submit'] ),
esc_attr( $args['id_submit'] ),
esc_attr( $args['class_submit'] ),
esc_attr( $args['label_submit'] )
);
$submit_button = apply_filters( 'comment_form_submit_button', $submit_button, $args );
$submit_field = sprintf(
$args['submit_field'],
$submit_button,
get_comment_id_fields( $post_id )
);
echo apply_filters( 'comment_form_submit_field', $submit_field, $args );
do_action( 'comment_form', $post_id );
?>
</form>
<?php endif; ?>
</div><!-- #respond -->