Guest User

Untitled

a guest
Oct 19th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4.  
  5. * @package WordPress
  6.  
  7. * @subpackage Default_Theme
  8.  
  9. */
  10.  
  11.  
  12.  
  13. // Do not delete these lines... this goes onto top of each page that uses a Comments Form:
  14.  
  15. if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  16.  
  17. die ('Please do not load this page directly. Thanks!');
  18.  
  19.  
  20.  
  21. if ( post_password_required() ) { ?>
  22.  
  23. <p class="nocomments">This post is password protected. Enter the password to view comments.</p>
  24.  
  25. <?php
  26.  
  27. return;
  28.  
  29. }
  30.  
  31. ?>
  32.  
  33.  
  34.  
  35. <!-- You can start editing here. -->
  36.  
  37.  
  38.  
  39. <?php if ( have_comments() ) : ?>
  40.  
  41. <h3 id="comments"><?php comments_number('No Responses', 'One Response', '% Responses' );?> to &#8220;<?php the_title(); ?>&#8221;</h3>
  42.  
  43.  
  44.  
  45. <ol class="comments">
  46.  
  47. <?php foreach ($comments as $comment) : ?>
  48.  
  49. <li>
  50.  
  51. <?php echo get_avatar(get_comment_author_email(), 90); ?>
  52.  
  53. <div class="main_comment">
  54.  
  55. <h4><?php comment_author_link(); ?> said...</h4>
  56.  
  57. <?php comment_text(); ?>
  58.  
  59. <span class="arrow"></span>
  60.  
  61. </div><!-- end main_comment-->
  62.  
  63. </li>
  64.  
  65. <?php endforeach; ?>
  66.  
  67. </ol>
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. <div class="navigation">
  76.  
  77. <div class="alignleft"><?php previous_comments_link() ?></div>
  78.  
  79. <div class="alignright"><?php next_comments_link() ?></div>
  80.  
  81. </div>
  82.  
  83. <?php else : // this is displayed if there are no comments so far ?>
  84.  
  85.  
  86.  
  87. <?php if ('open' == $post->comment_status) : ?>
  88.  
  89. <!-- If comments are open, but there are no comments. -->
  90.  
  91.  
  92.  
  93. <?php else : // comments are closed ?>
  94.  
  95. <!-- If comments are closed. -->
  96.  
  97. <p class="nocomments">Comments are closed.</p>
  98.  
  99.  
  100.  
  101. <?php endif; ?>
  102.  
  103. <?php endif; ?> <!-- end if have comments -->
  104.  
  105.  
  106.  
  107.  
  108.  
  109. <?php if ('open' == $post->comment_status) : ?>
  110.  
  111.  
  112.  
  113. <div id="respond">
  114.  
  115.  
  116.  
  117. <h3><?php comment_form_title( 'Leave a Reply', 'Leave a Reply to %s' ); ?></h3>
  118.  
  119.  
  120.  
  121. <div class="cancel-comment-reply">
  122.  
  123. <small><?php cancel_comment_reply_link(); ?></small>
  124.  
  125. </div>
  126.  
  127.  
  128.  
  129. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  130.  
  131. <p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php echo urlencode(get_permalink()); ?>">logged in</a> to post a comment.</p>
  132.  
  133. <?php else : ?>
  134.  
  135.  
  136.  
  137. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  138.  
  139.  
  140.  
  141. <?php if ( $user_ID ) : ?>
  142.  
  143.  
  144.  
  145. <p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out of this account">Log out &raquo;</a></p>
  146.  
  147.  
  148.  
  149. <?php else : ?>
  150.  
  151.  
  152.  
  153. <p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
  154.  
  155. <label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
  156.  
  157.  
  158.  
  159. <p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
  160.  
  161. <label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
  162.  
  163.  
  164.  
  165. <p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
  166.  
  167. <label for="url"><small>Website</small></label></p>
  168.  
  169.  
  170.  
  171. <?php endif; ?>
  172.  
  173.  
  174.  
  175. <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->
  176.  
  177.  
  178.  
  179. <p><textarea name="comment" id="comment" cols="50" rows="1" tabindex="4"></textarea></p>
  180.  
  181.  
  182.  
  183. <p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
  184.  
  185. <?php comment_id_fields(); ?>
  186.  
  187. </p>
  188.  
  189. <?php do_action('comment_form', $post->ID); ?>
  190.  
  191.  
  192.  
  193. </form>
  194.  
  195.  
  196.  
  197. <?php endif; // If registration required and not logged in ?>
  198.  
  199. </div>
  200.  
  201.  
  202.  
  203. <?php endif; // if you delete this the sky will fall on your head ?>
Add Comment
Please, Sign In to add comment