Не отключаются комментария в админке
-
На странице обсуждения включаю и выключаю комментария, но ни чего не меняется, пока не закомментишь форму добавления комментариев в коде (или раскомментируешь)
Очевидно я что то не то написал в файле comments.php, подскажите где что исправить.
COMMENTS.PHP
<?php if (comments_open()) { ?> <?php if (get_comments_number() == 0) { ?> <?php } else { ?> <ul id="comment_list"> <h4>Комментарии</h4> <?php function kallisto_comment($comment, $args, $depth){ $GLOBALS['comment'] = $comment; ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>"> <span class="userpic"><?php echo get_avatar($comment,$size='60',$default='<path_to_url>' ); ?></span> <span class="data_comm"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></span> <?php printf(__('<cite class="auther_name">%s</cite>'), get_comment_author_link()) ?> <?php if ($comment->comment_approved == '0') : ?> <em><?php _e('Your comment is awaiting moderation.') ?></em> <?php endif; ?> <?php comment_text() ?> <span id="reply"> <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?> </span> <?php } $args = array( 'reply_text' => 'Ответить', 'callback' => 'kallisto_comment' ); wp_list_comments($args); ?> </li></ul> <?php } ?> <?php $fields = array( 'author' => '<label for="author">' . __( '' ) . ($req ? '' : '') . '</label><input type="text" id="author" name="author" class="author" value="' . esc_attr($commenter['comment_author']) . '" placeholder="Имя *" pattern="[A-Za-zА-Яа-я]{3,}" maxlength="30" autocomplete="on" tabindex="1" required' . $aria_req . '>', 'email' => '<label for="email">' . __( '') . ($req ? '' : '') . '</label><input type="email" id="email" name="email" class="email" value="' . esc_attr($commenter['comment_author_email']) . '" placeholder="e-mail * (не будет опубликован)" maxlength="30" autocomplete="on" tabindex="2" required' . $aria_req . '>' ); $args = array( 'comment_notes_after' => '', 'comment_field' => '<label for="comment">' . '</label><textarea id="commentform" name="comment" aria-required="true" placeholder="Текст сообщения..."></textarea>', 'label_submit' => 'Отправить', 'fields' => apply_filters('comment_form_default_fields', $fields) ); comment_form($args); ?> <?php } else { ?> <h3>Обсуждения закрыты для данной страницы</h3> <?php } ?>
Просмотр 8 ответов — с 1 по 8 (всего 8)
Просмотр 8 ответов — с 1 по 8 (всего 8)
- Тема «Не отключаются комментария в админке» закрыта для новых ответов.