Make WordPress Core


Ignore:
Timestamp:
01/27/2023 11:05:35 PM (18 months ago)
Author:
joedolson
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r54526 r55156  
    530530                    <a href="{{ data.editLink }}"><?php _e( 'Edit more details' ); ?></a>
    531531                <# } #>
     532                <# if ( data.can.save && data.link ) { #>
     533                    <span class="links-separator">|</span>
     534                    <a href="{{ data.url }}" download><?php _e( 'Download file' ); ?></a>
     535                <# } #>
    532536                <# if ( ! data.uploading && data.can.remove ) { #>
    533537                    <# if ( data.link || data.can.save ) { #>
Note: See TracChangeset for help on using the changeset viewer.