Make WordPress Core


Ignore:
Timestamp:
07/29/2014 01:40:24 AM (10 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r29303 r29320  
    396396                        <label class="setting">
    397397                            <span class="name"><?php _e( 'Uploaded To' ); ?></span>
    398                             <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
     398                            <# if ( data.uploadedToLink ) { #>
     399                                <span class="value"><a href="{{ data.uploadedToLink }}">{{ data.uploadedToTitle }}</a></span>
     400                            <# } else { #>
     401                                <span class="value">{{ data.uploadedToTitle }}</span>
     402                            <# } #>
    399403                        </label>
    400404                    <# } #>
Note: See TracChangeset for help on using the changeset viewer.