Avoid PHP notices in Media Library if an attachment parent post type no longer exists.
props wpsmith. fixes #27439. git-svn-id: https://develop.svn.wordpress.org/trunk@27560 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6d13e3e1ff
commit
d4986f1b61
@ -329,7 +329,7 @@ foreach ( $columns as $column_name => $column_display_name ) {
|
||||
$parent_type = get_post_type_object( $parent->post_type );
|
||||
?>
|
||||
<td <?php echo $attributes ?>><strong>
|
||||
<?php if ( current_user_can( 'edit_post', $post->post_parent ) && $parent_type->show_ui ) { ?>
|
||||
<?php if ( current_user_can( 'edit_post', $post->post_parent ) && $parent_type && $parent_type->show_ui ) { ?>
|
||||
<a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
|
||||
<?php echo $title ?></a><?php
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user