Make WordPress Core

Changeset 5799


Ignore:
Timestamp:
07/15/2007 05:48:01 PM (18 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-post-rows.php

    r5751 r5799  
    1616add_filter('the_title','wp_specialchars');
    1717$class = ('alternate' == $class) ? '' : 'alternate';
     18global $current_user;
     19$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
    1820?>
    19     <tr id='post-<?php echo $id; ?>' class='<?php echo $class; ?>'>
     21    <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>'>
    2022
    2123<?php
Note: See TracChangeset for help on using the changeset viewer.