diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index d206aa163c..3f0bd79ea6 100644
a
|
b
|
function attachment_submitbox_metadata() { |
3266 | 3266 | |
3267 | 3267 | $att_url = wp_get_attachment_url( $attachment_id ); |
3268 | 3268 | |
3269 | | ?> |
| 3269 | $author = get_userdata( $post->post_author ); |
| 3270 | |
| 3271 | if ( $author && isset( $author->display_name ) ) : ?> |
| 3272 | <div class="misc-pub-section misc-pub-uploadedby"> |
| 3273 | <?php _e( 'Uploaded by:' ); ?> <strong><?php echo $author->display_name; ?></strong> |
| 3274 | </div> |
| 3275 | <?php endif; |
| 3276 | |
| 3277 | if ( $post->post_parent ) : |
| 3278 | |
| 3279 | $post_parent = get_post( $post->post_parent ); |
| 3280 | $parent_type = get_post_type_object( $post_parent->post_type ); |
| 3281 | |
| 3282 | if ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) { |
| 3283 | $uploaded_to_title = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' ); |
| 3284 | } |
| 3285 | |
| 3286 | if ( $parent_type && $parent_type->show_ui && current_user_can( 'edit_post', $post->post_parent ) ) { |
| 3287 | $uploaded_to_link = get_edit_post_link( $post->post_parent, 'raw' ); |
| 3288 | } |
| 3289 | |
| 3290 | if ( $uploaded_to_title ) : ?> |
| 3291 | <div class="misc-pub-section misc-pub-uploadedto"> |
| 3292 | <?php if ( $uploaded_to_link ) : ?> |
| 3293 | <?php _e( 'Uploaded to:' ); ?> <a href="<?php echo $uploaded_to_link ?>"><strong><?php echo $uploaded_to_title; ?></strong></a> |
| 3294 | <?php else: ?> |
| 3295 | <?php _e( 'Uploaded to:' ); ?> <strong><?php echo $uploaded_to_title; ?></strong> |
| 3296 | <?php endif; ?> |
| 3297 | </div> |
| 3298 | <?php endif; ?> |
| 3299 | <?php endif; ?> |
| 3300 | |
3270 | 3301 | <div class="misc-pub-section misc-pub-attachment"> |
3271 | 3302 | <label for="attachment_url"><?php _e( 'File URL:' ); ?></label> |
3272 | 3303 | <input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" /> |