- Timestamp:
- 06/27/2023 04:26:15 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-media-list-table.php
r56023 r56072 817 817 } 818 818 819 $actions['copy'] = sprintf( 820 '<span class="copy-to-clipboard-container"><button type="button" class="button-link copy-attachment-url media-library" data-clipboard-text="%s" aria-label="%s">%s</button><span class="success hidden" aria-hidden="true">%s</span></span>', 819 if ( $attachment_url ) { 820 $actions['copy'] = sprintf( 821 '<span class="copy-to-clipboard-container"><button type="button" class="button-link copy-attachment-url media-library" data-clipboard-text="%s" aria-label="%s">%s</button><span class="success hidden" aria-hidden="true">%s</span></span>', 822 esc_url( $attachment_url ), 823 /* translators: %s: Attachment title. */ 824 esc_attr( sprintf( __( 'Copy “%s” URL to clipboard' ), $att_title ) ), 825 __( 'Copy URL' ), 826 __( 'Copied!' ) 827 ); 828 } 829 } 830 831 if ( $attachment_url ) { 832 $actions['download'] = sprintf( 833 '<a href="%s" aria-label="%s" download>%s</a>', 821 834 esc_url( $attachment_url ), 822 835 /* translators: %s: Attachment title. */ 823 esc_attr( sprintf( __( 'Copy “%s” URL to clipboard' ), $att_title ) ), 824 __( 'Copy URL' ), 825 __( 'Copied!' ) 836 esc_attr( sprintf( __( 'Download “%s”' ), $att_title ) ), 837 __( 'Download file' ) 826 838 ); 827 839 } 828 829 $actions['download'] = sprintf(830 '<a href="%s" aria-label="%s" download>%s</a>',831 esc_url( $attachment_url ),832 /* translators: %s: Attachment title. */833 esc_attr( sprintf( __( 'Download “%s”' ), $att_title ) ),834 __( 'Download file' )835 );836 840 837 841 if ( $this->detached && current_user_can( 'edit_post', $post->ID ) ) {
Note: See TracChangeset
for help on using the changeset viewer.