Projects : mp-wp : mp-wp_svg-screenshots-and-errorreporting-r2

mp-wp/wp-content/themes/classic/comments.php

Dir - Raw

1<?php
2/**
3 * @package WordPress
4 * @subpackage Classic_Theme
5 */
6
7if ( post_password_required() ) : ?>
8<p><?php _e('Enter your password to view comments.'); ?></p>
9<?php return; endif; ?>
10
11<h2 id="comments"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?>
12<?php if ( comments_open() ) : ?>
13 <a href="#postcomment" title="<?php _e("Leave a comment"); ?>">&raquo;</a>
14<?php endif; ?>
15</h2>
16
17<?php if ( $comments ) : ?>
18<ol id="commentlist">
19
20<?php foreach ($comments as $comment) : ?>
21 <li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
22 <?php echo get_avatar( $comment, 32 ); ?>
23 <?php comment_text() ?>
24 <p><cite><?php comment_type(_c('Comment|noun'), __('Trackback'), __('Pingback')); ?> <?php _e('by'); ?> <?php comment_author_link() ?> &#8212; <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite> <?php edit_comment_link(__("Edit This"), ' |'); ?></p>
25 </li>
26
27<?php endforeach; ?>
28
29</ol>
30
31<?php else : // If there are no comments yet ?>
32 <p><?php _e('No comments yet.'); ?></p>
33<?php endif; ?>
34
35<p><?php post_comments_feed_link(__('<abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.')); ?>
36<?php if ( pings_open() ) : ?>
37 <a href="<?php trackback_url() ?>" rel="trackback"><?php _e('TrackBack <abbr title="Universal Resource Locator">URL</abbr>'); ?></a>
38<?php endif; ?>
39</p>
40
41<?php if ( comments_open() ) : ?>
42<h2 id="postcomment"><?php _e('Leave a comment'); ?></h2>
43
44<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
45<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), get_option('siteurl')."/wp-login.php?redirect_to=".urlencode(get_permalink()));?></p>
46<?php else : ?>
47
48<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
49
50<?php if ( $user_ID ) : ?>
51
52<p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account') ?>"><?php _e('Log out &raquo;'); ?></a></p>
53
54<?php else : ?>
55
56<?php $suffix = substr(md5(date('Y-m-d').$_SERVER['REMOTE_ADDR']).$_SERVER['HTTP_USER_AGENT'],6,7); ?>
57
58<p><input type="text" name="author<?php echo $suffix;?>" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
59<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
60
61<p><input type="text" name="email<?php echo $suffix;?>" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
62<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>
63
64<p><input type="text" name="url<?php echo $suffix;?>" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
65<label for="url"><small>Website</small></label></p>
66
67<?php endif; ?>
68
69<!--<p><small><strong>XHTML:</strong> <?php printf(__('You can use these tags: %s'), allowed_tags()); ?></small></p>-->
70
71<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
72
73<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
74<input type="hidden" name="comment_post_time" value="<?php echo time(),"-",$_SERVER['REMOTE_ADDR']; ?>" />
75<?php comment_id_fields(); ?>
76</p>
77<?php do_action('comment_form', $post->ID); ?>
78
79</form>
80
81<?php endif; // If registration required and not logged in ?>
82
83<?php else : // Comments are closed ?>
84<p><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
85<?php endif; ?>