Files on backend

This topic contains 2 reply and 2 voices, and was last updated by ronilagin 11 years ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
April 22, 2013 at 2:51 am 2653
ronilagin Hello, When I edit a post from the back end, is there a way to download files that are uploaded?  I only see an option to delete.
April 22, 2013 at 12:08 pm 2691
Tareq Hasan Tareq Hasan

Putting the download link in the admin panel makes sense. Add this code in /class/render-form.php in 742 number line:
[php]
if ( is_admin() ) {
printf( ‘<a href="%s" rel="nofollow">%s</a>’, wp_get_attachment_url( $attach_id ), __( ‘Download File’, ‘wpuf’ ) );
}
[/php]

So it should look like:
[php]
if ( $uploaded_items ) {
foreach ($uploaded_items as $attach_id) {
echo WPUF_Upload::attach_html( $attach_id, $attr[‘name’] );

if ( is_admin() ) {
printf( ‘<a href="%s" rel="nofollow">%s</a>’, wp_get_attachment_url( $attach_id ), __( ‘Download File’, ‘wpuf’ ) );
}
}
}
[/php]

April 23, 2013 at 3:29 am 2747
ronilagin ronilagin

Thanks!

Viewing 2 Posts - 1 through 2 (of 2 total)