Make WordPress Core

Ticket #20453: 20453.patch

File 20453.patch, 910 bytes (added by johnbillion, 13 years ago)
  • wp-admin/includes/class-wp-media-list-table.php

     
    295295
    296296        case 'parent':
    297297                if ( $post->post_parent > 0 ) {
    298                         if ( get_post( $post->post_parent ) ) {
     298                        if ( $parent = get_post( $post->post_parent ) ) {
    299299                                $title =_draft_or_post_title( $post->post_parent );
     300                                $parent_type = get_post_type_object( $parent->post_type );
    300301                        }
    301302?>
    302303                        <td <?php echo $attributes ?>><strong>
    303                                 <?php if( current_user_can( 'edit_post', $post->post_parent ) ) { ?>
     304                                <?php if( current_user_can( 'edit_post', $post->post_parent ) and $parent_type->show_ui ) { ?>
    304305                                        <a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
    305306                                                <?php echo $title ?></a><?php
    306307                                } else {