SergeyBiryukov

http://ru.forums.wordpress.org/topic/39709

Jul 27th, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.10 KB | None | 0 0
  1. <!-- You can start editing here. -->
  2. <div id="commentpost">
  3.  
  4.     <?php if ( have_comments() ) : ?>
  5.  
  6.         <h4 id="comments"><?php comments_number('Пока комментариев нет. Напишем?', 'Есть 1 комментарий', 'Есть % комментариев'); ?> к “<?php the_title(); ?>”</h4>
  7.  
  8.         <?php if ( ! empty($comments_by_type['comment']) ) : ?>
  9.  
  10.             <div id="post-navigator-single">
  11.                 <div class="alignleft"><?php previous_comments_link() ?></div>
  12.                 <div class="alignright"><?php next_comments_link() ?></div>
  13.             </div>
  14.  
  15.             <ol class="commentlist">
  16.                 <?php wp_list_comments('type=comment&callback=user_comment'); ?>
  17.             </ol>
  18.  
  19.             <div id="post-navigator-single">
  20.                 <div class="alignleft"><?php previous_comments_link() ?></div>
  21.                 <div class="alignright"><?php next_comments_link() ?></div>
  22.             </div>
  23.  
  24.         <?php endif; ?>
  25.  
  26.      <?php else : // this is displayed if there are no comments so far ?>
  27.  
  28.         <?php if ( 'open' == $post->comment_status ) : ?>
  29.             <!-- If comments are open, but there are no comments. -->
  30.             <h4 id="comments">Пока комментариев нет. Напишем?</h4>
  31.  
  32.         <?php else : // comments are closed ?>
  33.             <!-- If comments are closed. -->
  34.             <h2 id="post-header">Комментарии закрыты.</h2>
  35.  
  36.         <?php endif; ?>
  37.  
  38.     <?php endif; ?>
  39.  
  40.     <?php if ( 'open' == $post->comment_status ) : ?>
  41.  
  42.         <div id="respond">
  43.  
  44.             <h4><?php comment_form_title( 'Оставить комментарий', 'Написать ответ %s' ); ?></h4>
  45.  
  46.             <div class="cancel-comment-reply">
  47.                 <?php cancel_comment_reply_link('Отмена'); ?>
  48.             </div>
  49.  
  50.             <form action="/wp-comments-post.php" method="post" id="cf">
  51.  
  52.                 <?php if ( $user_ID ) : ?>
  53.  
  54.                     <p>Вы вошли как: <a href="/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Выйти из аккаунта">Выход &raquo;</a></p>
  55.  
  56.                 <?php else : ?>
  57.  
  58.                     <p>
  59.                         <label for="author"><small>Ваше имя <?php if ($req) echo "(обязательно)"; ?></small></label><br />
  60.                         <input type="text" class="tf" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  61.                     </p>
  62.  
  63.                     <p>
  64.                         <label for="email"><small>Ваша почта <?php if ($req) echo "(обязательно)"; ?></small></label><br />
  65.                         <input type="email" class="tf" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  66.                     </p>
  67.  
  68.                 <?php endif; ?>
  69.  
  70.                 <textarea name="comment" id="comment" cols="50%" rows="8" class="af" tabindex="3"></textarea>
  71.  
  72.                 <div>
  73.                     <input name="submit" type="submit" class="st" value="Отправить" id="submit" alt="Отправить свой комментарий" tabindex="4" />
  74.                 </div>
  75.  
  76.                 <?php comment_id_fields(); ?>
  77.  
  78.                 <?php do_action('comment_form', $post->ID); ?>
  79.  
  80.             </form>
  81.  
  82.         </div>
  83.  
  84.     <?php endif; // if you delete this the sky will fall on your head ?>
  85.  
  86. </div>
Add Comment
Please, Sign In to add comment