summaryrefslogtreecommitdiffstats
path: root/wp-admin/async-upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/async-upload.php')
-rw-r--r--wp-admin/async-upload.php28
1 files changed, 14 insertions, 14 deletions
diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php
index 864f2be..551f854 100644
--- a/wp-admin/async-upload.php
+++ b/wp-admin/async-upload.php
@@ -64,22 +64,22 @@ if ( isset( $_REQUEST['attachment_id'] ) && (int) $_REQUEST['attachment_id'] &&
?>
<div class="filename new">
<span class="media-list-title"><strong><?php echo esc_html( wp_html_excerpt( $title, 60, '&hellip;' ) ); ?></strong></span>
- <span class="media-list-subtitle"><?php echo wp_basename( $file ); ?></span>
+ <span class="media-list-subtitle"><?php echo esc_html( wp_basename( $file ) ); ?></span>
+ <div class="attachment-tools">
+ <?php
+ if ( current_user_can( 'edit_post', $id ) ) {
+ echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '">' . _x( 'Edit', 'media item' ) . '</a>';
+ } else {
+ echo '<span class="edit-attachment">' . _x( 'Success', 'media item' ) . '</span>';
+ }
+ ?>
+ <span class="media-item-copy-container copy-to-clipboard-container edit-attachment">
+ <button type="button" class="button button-small copy-attachment-url" data-clipboard-text="<?php echo $file_url; ?>"><?php _e( 'Copy URL to clipboard' ); ?></button>
+ <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
+ </span>
+ </div>
</div>
</div>
- <div class="attachment-tools">
- <span class="media-item-copy-container copy-to-clipboard-container edit-attachment">
- <button type="button" class="button button-small copy-attachment-url" data-clipboard-text="<?php echo $file_url; ?>"><?php _e( 'Copy URL to clipboard' ); ?></button>
- <span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
- </span>
- <?php
- if ( current_user_can( 'edit_post', $id ) ) {
- echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '">' . _x( 'Edit', 'media item' ) . '</a>';
- } else {
- echo '<span class="edit-attachment">' . _x( 'Success', 'media item' ) . '</span>';
- }
- ?>
- </div>
</div>
<?php
break;