What’s the best way of doing this:
On The ‘Media Library’ page, I would like a link next to ‘View’ (the ‘View’ that appears when you hover over a Media item) for ‘Download’. The ‘Download’ hyperlink would link directly to the file, unlike the ‘View’ link which links to a template-based page with either the embedded image or a link to the non-image file.
I have a lot of PDF’s in my media library that I look up regularly, having to click on ‘View’ and then click on the hyper-linked file name just to get to the file is a little cumbersome.
Modified version of a piece of code found in this tutorial.
The download script resides here:
/wp-content/download.php
.And here’s a sample code of a force download script.
With HTML5 being used it is easier: