Make WordPress Core

Ticket #29566: 29566.patch

File 29566.patch, 1.2 KB (added by SergeyBiryukov, 9 years ago)
  • src/wp-includes/media-template.php

     
    394394                                        <span class="name"><?php _e( 'Uploaded By' ); ?></span>
    395395                                        <span class="value">{{ data.authorName }}</span>
    396396                                </label>
    397                                 <# if ( data.uploadedTo ) { #>
     397                                <# if ( data.uploadedToTitle ) { #>
    398398                                        <label class="setting">
    399399                                                <span class="name"><?php _e( 'Uploaded To' ); ?></span>
    400400                                                <# if ( data.uploadedToLink ) { #>
  • src/wp-includes/media.php

     
    26432643
    26442644        if ( $attachment->post_parent ) {
    26452645                $post_parent = get_post( $attachment->post_parent );
     2646        } else {
     2647                $post_parent = false;
     2648        }
     2649
     2650        if ( $post_parent ) {
    26462651                $parent_type = get_post_type_object( $post_parent->post_type );
    26472652                if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $attachment->post_parent ) ) {
    26482653                        $response['uploadedToLink'] = get_edit_post_link( $attachment->post_parent, 'raw' );