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

git-svn-id: http://svn.automattic.com/wordpress/trunk@5799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-07-15 17:48:01 +00:00
parent c140ccb72d
commit 22c16718c5
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