I've just realised on a site that is about to go live that the standard WP media browser for the site now also contains images uploaded by other users via the comments front-end.
I really need a way to filter the images from there. It would be useful to have access in this interface (although not vital). But it's really important that the users images can be hidden if desired so that I only see images uploaded by the content editors of this site that are connected to the posts/pages they author.
Is there an easy way to do this ?
Hi AdamTheForumUser,
I'm really sorry, but there isn't an easy solution for this.
I've come up with a solution that for our particular scenario is good enough, which I will share below in case useful for others.
Basically it alters the WP admin to only list images belonging to that particular author when using interfaces like the media library page. As this is pretty much a one person admin site it works although clearly it wouldn't be flexible enough for some others.
// hide users media upload (via wpdiscuz in the media library interface) add_filter( 'ajax_query_attachments_args', 'wpb_show_current_user_attachments' ); function wpb_show_current_user_attachments( $query ) { $user_id = get_current_user_id(); if( $user_id ) { $query['author'] = $user_id; } return $query; }
I'm surprised there isn't some way to handle this at all in the plugin. You must have had others asking about this I assume ? Can I make it a wishlist request if you are keeping wishes from customers ?