Make WordPress Core


Ignore:
Timestamp:
04/23/2009 07:11:31 AM (16 years ago)
Author:
ryan
Message:

Use is_user_logged_in(), have_comments in bundled themes. Props zeo. fixes #9626

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/classic/comments.php

    r10931 r11067  
    1515</h2>
    1616
    17 <?php if ( $comments ) : ?>
     17<?php if ( have_comments() ) : ?>
    1818<ol id="commentlist">
    1919
     
    4242<h2 id="postcomment"><?php _e('Leave a comment'); ?></h2>
    4343
    44 <?php if ( get_option('comment_registration') && !$user_ID ) : ?>
     44<?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
    4545<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.'), wp_login_url( get_permalink() ) );?></p>
    4646<?php else : ?>
     
    4848<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
    4949
    50 <?php if ( $user_ID ) : ?>
     50<?php if ( is_user_logged_in() ) : ?>
    5151
    5252<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>
Note: See TracChangeset for help on using the changeset viewer.