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:
parent
c140ccb72d
commit
22c16718c5
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue