Use get_current_user() and get_current_user_id() instead of global . Props filofo. see #13934 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@15315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-06-24 15:01:29 +00:00
parent 3cd056320a
commit 494ee995b5
11 changed files with 56 additions and 62 deletions

View File

@@ -39,8 +39,8 @@ elseif ( !$is_trash && $post->post_status == 'trash' )
continue;
$alt = ( 'alternate' == $alt ) ? '' : 'alternate';
global $current_user;
$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
$post_owner = ( get_current_user_id() == $post->post_author ? 'self' : 'other' );
$att_title = _draft_or_post_title();
?>
<tr id='post-<?php echo $id; ?>' class='<?php echo trim( $alt . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">