PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 1ms app.codeStats 0ms

/webroot/blog/wp-content/themes/la-school-blue/comments.php

https://github.com/Wargo/reddevil
PHP | 84 lines | 57 code | 27 blank | 0 comment | 18 complexity | 637058f056f99b89e42685f42ca38c21 MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1, GPL-3.0
  1. <?php // Do not delete these lines
  2. if (isset($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
  3. die ('Please do not load this page directly. Thanks!');
  4. if ( post_password_required() ) { ?>
  5. <p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'laschool'); ?></p>
  6. <?php
  7. return;
  8. }
  9. ?>
  10. <?php if ( have_comments() ) : ?>
  11. <h2 id="comments"><?php comments_number(__('No Responses', 'laschool'), __('One Response', 'laschool'), __('% Responses', 'laschool'));?> <?php printf(__('to &#8220;%s&#8221;', 'laschool'), the_title('', '', false)); ?></h2>
  12. <ol class="comments">
  13. <?php wp_list_comments(); ?>
  14. </ol>
  15. <div class="navigation">
  16. <div class="alignleft"><?php previous_comments_link() ?></div>
  17. <div class="alignright"><?php next_comments_link() ?></div>
  18. </div>
  19. <?php else : // this is displayed if there are no comments so far ?>
  20. <?php if ('open' == $post->comment_status) : ?>
  21. <!-- If comments are open, but there are no comments. -->
  22. <?php else : // comments are closed ?>
  23. <!-- If comments are closed. -->
  24. <p class="nocomments"><?php _e('Comments are closed.', 'laschool'); ?></p>
  25. <?php endif; ?>
  26. <?php endif; ?>
  27. <?php if ('open' == $post->comment_status) : ?>
  28. <h2 id="respond"><?php comment_form_title( __('Leave a Reply', 'laschool'), __('Leave a Reply to %s', 'laschool') ); ?></h2>
  29. <div class="cancel-comment-reply">
  30. <small><?php cancel_comment_reply_link(); ?></small>
  31. </div>
  32. <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
  33. <p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'laschool'), get_option('siteurl') . '/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p>
  34. <?php else : ?>
  35. <fieldset>
  36. <legend><?php _e('Leave a Reply', 'laschool'); ?></legend>
  37. <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  38. <?php if ( $user_ID ) : ?>
  39. <p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'laschool'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'laschool'); ?>"><?php _e('Log out &raquo;', 'laschool'); ?></a></p>
  40. <?php else : ?>
  41. <p><label for="author"><?php _e('Name', 'laschool'); ?> <?php if ($req) _e("<small>required</small>", "laschool"); ?></label>
  42. <input type="text" id="author" name="author" value="<?php echo $comment_author; ?>" class="input" tabindex="1" /></p>
  43. <p><label for="email"><?php _e('Mail <small>will not be published</small>', 'laschool'); ?><?php if ($req) _e("<small>, required</small>", "laschool"); ?></label>
  44. <input type="text" id="email" name="email" value="<?php echo $comment_author_email; ?>" class="input" tabindex="2" /></p>
  45. <p><label for="url"><?php _e('Website', 'laschool'); ?></label>
  46. <input type="text" id="url" name="url" value="<?php echo $comment_author_url; ?>" class="input" tabindex="3" /></p>
  47. <?php endif; ?>
  48. <p><label for="comment"><?php _e('Comment', 'laschool'); ?> <?php _e('<small>no spam</small>', 'laschool'); ?></label>
  49. <textarea id="comment" name="comment" class="textarea" cols="45" rows="8" tabindex="4"></textarea>
  50. </p>
  51. <p><input type="submit" id="submit" name="submit" value="<?php _e('Submit Comment', 'laschool'); ?>" class="submit" tabindex="5" /> <?php _e('or', 'laschool'); ?> <a href="" tabindex="6"><?php _e('chancel', 'laschool'); ?></a>
  52. <?php comment_id_fields(); ?></p>
  53. <?php do_action('comment_form', $post->ID); ?>
  54. </form>
  55. </fieldset>
  56. <?php endif; // If registration required and not logged in ?>
  57. <?php endif; // if you delete this the sky will fall on your head ?>