Make WordPress Core

Ticket #6408: 6408.001.diff

File 6408.001.diff, 1.0 KB (added by markjaquith, 16 years ago)
  • wp-admin/edit-attachment-rows.php

     
    8585                break;
    8686
    8787        case 'parent':
    88                 if ( $post_parent = get_post($post->post_parent) ) {
    89                         $title = get_the_title($post->post_parent);
    90                         if ( empty($title) )
    91                                 $title = __('(no title)');
     88                $title = __('(no title)'); // override below
     89                if ( $post->post_parent > 0 ) {
     90                        if ( get_post($post->post_parent) ) {
     91                                $parent_title = get_the_title($post->post_parent);
     92                                if ( !empty($parent_title) )
     93                                        $title = $parent_title;
     94                        }
     95                        ?>
     96                        <td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
     97                        <?php
    9298                } else {
    93                         $title = '';
     99                        ?>
     100                        <td>&nbsp;</td>
     101                        <?php
    94102                }
    95                 ?>
    96                 <td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
    97                 <?php
     103
    98104                break;
    99105
    100106        case 'comments':