Home Forums Plugin Support WP User Frontend Pro Files on backend

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  ronilagin 5 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2653

    ronilagin
    Participant
    Post count: 24

    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.

    #2691

    Tareq Hasan
    Keymaster
    Post count: 2831

    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]

    #2747

    ronilagin
    Participant
    Post count: 24

    Thanks!

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Files on backend’ is closed to new replies.