Do not double-mark posts as "Private" in the admin. fixes #3146

git-svn-id: http://svn.automattic.com/wordpress/trunk@7404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-03-19 21:33:47 +00:00
parent ca900d471c
commit 0f026c38f9
2 changed files with 7 additions and 5 deletions

View File

@ -73,7 +73,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
case 'title':
?>
<td><strong><a class="row-title" href="post.php?action=edit&amp;post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a></strong>
<?php if ('private' == $post->post_status) _e(' &#8212; <strong>Private</strong>'); ?></td>
<?php if ( !empty($post->post_password) ) { _e(' &#8212; <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' &#8212; <strong>Private</strong>'); } ?></td>
<?php
break;

View File

@ -54,11 +54,13 @@ function get_the_title( $id = 0 ) {
$post = &get_post($id);
$title = $post->post_title;
if ( !is_admin() ) {
if ( !empty($post->post_password) )
$title = sprintf(__('Protected: %s'), $title);
else if ( isset($post->post_status) && 'private' == $post->post_status )
$title = sprintf(__('Private: %s'), $title);
}
return apply_filters( 'the_title', $title );
}