Avoid PHP notices in Media Library if an attachment parent post type no longer exists.

Synchronize the 'edit_post' capability check between the list table and the media grid.

fixes #27446.

git-svn-id: https://develop.svn.wordpress.org/trunk@29320 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2014-07-29 01:40:24 +00:00
parent a475124608
commit e2d9939e57
3 changed files with 10 additions and 3 deletions
+5 -1
View File
@@ -395,7 +395,11 @@ function wp_print_media_templates() {
<# if ( data.uploadedTo ) { #>
<label class="setting">
<span class="name"><?php _e( 'Uploaded To' ); ?></span>
<span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
<# if ( data.uploadedToLink ) { #>
<span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
<# } else { #>
<span class="value">{{ data.uploadedToTitle }}</span>
<# } #>
</label>
<# } #>
<div class="attachment-compat"></div>