diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/async-upload.php | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-23bd21eba100fba4eccff0d3eb058c92bcf55964.tar.xz wordpress-23bd21eba100fba4eccff0d3eb058c92bcf55964.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/async-upload.php')
-rw-r--r-- | wp-admin/async-upload.php | 28 |
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, '…' ) ); ?></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; |