Don't show broken parent post links for orphaned media. fixes #6408
git-svn-id: https://develop.svn.wordpress.org/trunk@7543 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0afce7ab24
commit
d1d1904927
@ -85,16 +85,22 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'parent':
|
case 'parent':
|
||||||
if ( $post_parent = get_post($post->post_parent) ) {
|
$title = __('(no title)'); // override below
|
||||||
$title = get_the_title($post->post_parent);
|
if ( $post->post_parent > 0 ) {
|
||||||
if ( empty($title) )
|
if ( get_post($post->post_parent) ) {
|
||||||
$title = __('(no title)');
|
$parent_title = get_the_title($post->post_parent);
|
||||||
|
if ( !empty($parent_title) )
|
||||||
|
$title = $parent_title;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<td><strong><a href="post.php?action=edit&post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
|
||||||
|
<?php
|
||||||
} else {
|
} else {
|
||||||
$title = '';
|
?>
|
||||||
|
<td> </td>
|
||||||
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
<td><strong><a href="post.php?action=edit&post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
|
|
||||||
<?php
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'comments':
|
case 'comments':
|
||||||
|
Loading…
Reference in New Issue
Block a user