Add classes that indicate post status and author ownership. Props tellyworth. fixes #4628

git-svn-id: https://develop.svn.wordpress.org/trunk@5799 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2007-07-15 17:48:01 +00:00
parent c315fbacdb
commit 5987b868bb
1 changed files with 3 additions and 1 deletions

View File

@ -15,8 +15,10 @@ $bgcolor = '';
while (have_posts()) : the_post();
add_filter('the_title','wp_specialchars');
$class = ('alternate' == $class) ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo $class; ?>'>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>'>
<?php