Detect whether a user is logged in for popup comments templates in default and classic themes. props skippy, Nazgul, rob1n. fixes #1065
git-svn-id: http://svn.automattic.com/wordpress/trunk@4890 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5ba17b01b8
commit
4280a27b44
|
@ -56,6 +56,9 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
|
||||||
<p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
|
<p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
|
<?php if ( $user_ID ) : ?>
|
||||||
|
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
|
||||||
|
<?php else : ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author"><?php _e("Name"); ?></label>
|
<label for="author"><?php _e("Name"); ?></label>
|
||||||
|
@ -72,6 +75,7 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
|
||||||
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
|
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
|
||||||
<label for="url"><?php _e("<abbr title=\"Universal Resource Locator\">URL</abbr>"); ?></label>
|
<label for="url"><?php _e("<abbr title=\"Universal Resource Locator\">URL</abbr>"); ?></label>
|
||||||
</p>
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label for="comment"><?php _e("Your Comment"); ?></label>
|
<label for="comment"><?php _e("Your Comment"); ?></label>
|
||||||
|
|
|
@ -56,6 +56,9 @@ if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $pos
|
||||||
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||||
|
|
||||||
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||||
|
<?php if ( $user_ID ) : ?>
|
||||||
|
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
|
||||||
|
<?php else : ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||||
<label for="author">Name</label>
|
<label for="author">Name</label>
|
||||||
|
@ -72,6 +75,7 @@ if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $pos
|
||||||
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
|
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
|
||||||
<label for="url"><abbr title="Universal Resource Locator">URL</abbr></label>
|
<label for="url"><abbr title="Universal Resource Locator">URL</abbr></label>
|
||||||
</p>
|
</p>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<label for="comment">Your Comment</label>
|
<label for="comment">Your Comment</label>
|
||||||
|
|
Loading…
Reference in New Issue