Get 15% off on all our plugins, themes and memberships till 4th December. Use coupon: BLACKFRIDAY2021.

BuddyDev

Search

How to let uploads make use of the word-press media

  • Participant
    Level: Enlightened
    Posts: 44
    bo on #13685

    I recently wanted to take a function were all my uploads would make use of WordPress media upload, as the goal to using this function, from thought would let the logged in user make use of his past uploaded images without just uploading always.
    this would also help to prevent duplicate images and excess use of images; making it useful to use his past uploaded images and other uploads.
    ( although i was able to get a function to this backed where all user mages all is uploads and properties )
    The main focus now i had gotten so much headache was finding a way to let it use this front-end)

    The goal is to have this appear on all uploads front-end :
    https://postimg.org/image/5obsw3lst/

    I would really be grateful, and hope to hear all readers view;
    Although i know there are some theme that uses this exact property, i wish i could implement this, thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 19833
    Brajesh Singh on #13696

    Hi Bo,
    Thank you.

    It is easy to achieve.

    You need to achieve this in 2 step

    1. Allow normal user(say subscriber) permissions(capability) to upload
    2. Enqueue WordPress Media modal for front end and attach a handle to trigger opening it.

    Please see this
    https://github.com/buddydev/bbp-attach-media

    for what we did for bbPress.

    Hope that helps.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 44
    bo on #13743

    Yes i was helpful,as although am not much of a developer it would likely take me a long while to find how to implement it to all the upload function properties used;

    as that could mean i would have to find ways to implement, submission of featured images on post and custom post-types,bp-profile,bp-cover,e.t.c:,

    How I wish there was a simple less line that could just trigger it on all areas where a need for upload existed.

    Hope to her your thoughts, and hear from you soon

    Thank you very much,
    as you saved me a lot and helped me know the function is possible;
    As also thank-you for sharing your piece of code
    You are the best and thank you for keeping this forum alive.

    • This reply was modified 3 years, 9 months ago by bo.

You must be logged in to reply to this topic.

This topic is: not resolved