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:
parent
c315fbacdb
commit
5987b868bb
|
@ -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