mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
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;
|
||||
|
||||
case 'parent':
|
||||
if ( $post_parent = get_post($post->post_parent) ) {
|
||||
$title = get_the_title($post->post_parent);
|
||||
if ( empty($title) )
|
||||
$title = __('(no title)');
|
||||
$title = __('(no title)'); // override below
|
||||
if ( $post->post_parent > 0 ) {
|
||||
if ( get_post($post->post_parent) ) {
|
||||
$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 {
|
||||
$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;
|
||||
|
||||
case 'comments':
|
||||
|
Loading…
x
Reference in New Issue
Block a user