Как изменить comment-template.php?
-
Хочу сделать так чтобы только я мог отвечать на комментарии. Как поставить условие я знаю, но проблема в том, что я написал макет комментариев (comments.php) с нуля и стандартная функция comment_reply_link теперь не работает. Как мне переделать файл /wp-includes/comment-template.php чтобы заработало? Привожу мой макет комментариев (comments.php) и то, что я думаю, нужно менять в comment-template.php.
<ol> <li id='comment-<?php comment_ID() ?>'> <?php comment_author_link() ?> <time datetime='<?php the_date('Y-m-d'); ?>'> <?php comment_date('jS F Y') ?> в <?php comment_time() ?> </time> <a href='#comment-<?php comment_ID() ?>' title='Ссылка на комментарий'>#</a> <?php edit_comment_link("<small>Править</small>"); ?> <?php comment_text() ?> <?php comment_reply_link() ?> </li> </ol>
if ( get_option('comment_registration') && !$user_ID ) $link = '<a class="comment-reply-login" href="' . esc_url( wp_login_url( get_permalink() ) ) . '">' . $login_text . '</a>'; else $link = "<a class='comment-reply-link' href='" . esc_url( add_query_arg( 'replytocom', $comment->comment_ID ) ) . "#" . $respond_id . "' onclick='return addComment.moveForm(\"$add_below-$comment->comment_ID\", \"$comment->comment_ID\", \"$respond_id\", \"$post->ID\")'>$reply_text</a>"; return apply_filters('comment_reply_link', $before . $link . $after, $args, $comment, $post);
Просмотр 1 ответа (всего 1)
Просмотр 1 ответа (всего 1)
- Тема «Как изменить comment-template.php?» закрыта для новых ответов.