Add Media Button

This topic contains 4 replies, has 3 voices, and was last updated by  Kiran 5 years, 6 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #452122

    Neil Hall
    Buyer
    Post count: 83

    Hi

    On one of the recent updates I see that you implemented a change where only Editors/Admin can see the ‘Add Media’ Button.

    Could you tell me which file this was implemented in please.

    Best Regards
    Neil

    #452124

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    The frontend editor does (should not show the Add Media button. Is that where you are seeing it, on the Add-Listing page?

    There are security considerations reasonable to disallow access to the media library for general users on the frontend, which is why the frontend editor should be blocking media library access.

    If “Add Media” is visible in the add-listing page, then we can take a look and see why that is happening.

    If you mean in the backend editor, GD doesn’t make any changes to the way the default WordPress editor works on backend pages. Granting backend access is up to the site manager.

    #452133

    Neil Hall
    Buyer
    Post count: 83

    Hi Alex

    I realize the risks of having the Add Media button on the Listing Page and the access by general users to the Media Library.

    I had some code that restricted Users to only see their own files in the Media Library from the frontend, and I would like to test it again. But to do this I need to be able to login as a user, and for the Add Media Button to be visible.

    So how can I show the Add Media Button. Could you point me in the direction of the code?

    Best Regards
    Neil

    #452145

    Alex Rollin
    Moderator
    Post count: 27815

    We only load the default editor. I’m not sure it would be possible to make the full editor show without a customization.

    I will flag your question for the developers in case they have a workaround.

    #452203

    Kiran
    Moderator
    Post count: 7069

    Hello,

    We have disable media_buttons for the users, but via hook you can enable it. You can use wp_editor_settings hook to filter editor settings. Read more about hook https://developer.wordpress.org/reference/hooks/wp_editor_settings/

    Kiran

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket