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:
parent
ca900d471c
commit
0f026c38f9
|
@ -73,7 +73,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
||||||
case 'title':
|
case 'title':
|
||||||
?>
|
?>
|
||||||
<td><strong><a class="row-title" href="post.php?action=edit&post=<?php the_ID(); ?>" title="<?php echo attribute_escape(sprintf(__('Edit "%s"'), $title)); ?>"><?php echo $title ?></a></strong>
|
<td><strong><a class="row-title" href="post.php?action=edit&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(' — <strong>Private</strong>'); ?></td>
|
<?php if ( !empty($post->post_password) ) { _e(' — <strong>Protected</strong>'); } elseif ('private' == $post->post_status) { _e(' — <strong>Private</strong>'); } ?></td>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,13 @@ function get_the_title( $id = 0 ) {
|
||||||
$post = &get_post($id);
|
$post = &get_post($id);
|
||||||
|
|
||||||
$title = $post->post_title;
|
$title = $post->post_title;
|
||||||
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);
|
|
||||||
|
|
||||||
|
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 );
|
return apply_filters( 'the_title', $title );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue