mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
Media: Add download link to media modal and attachment details.
Make it easier for users to download their uploaded media by providing a download link on the attachment details screen and in the media modal. Props countrymusicchicago, joedolson, amin7 Fixes #41474. git-svn-id: https://develop.svn.wordpress.org/trunk@55156 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3336,6 +3336,9 @@ function attachment_submitbox_metadata() {
|
||||
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="misc-pub-section misc-pub-download">
|
||||
<a href="<?php echo esc_attr( $att_url ); ?>" download><?php _e( 'Download file' ); ?></a>
|
||||
</div>
|
||||
<div class="misc-pub-section misc-pub-filename">
|
||||
<?php _e( 'File name:' ); ?> <strong><?php echo $filename; ?></strong>
|
||||
</div>
|
||||
|
||||
@@ -529,6 +529,10 @@ function wp_print_media_templates() {
|
||||
<# } #>
|
||||
<a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a>
|
||||
<# } #>
|
||||
<# if ( data.can.save && data.link ) { #>
|
||||
<span class="links-separator">|</span>
|
||||
<a href="{{ data.url }}" download><?php _e( 'Download file' ); ?></a>
|
||||
<# } #>
|
||||
<# if ( ! data.uploading && data.can.remove ) { #>
|
||||
<# if ( data.link || data.can.save ) { #>
|
||||
<span class="links-separator">|</span>
|
||||
|
||||
Reference in New Issue
Block a user