Defaulting new posts and media uploads to use “Registered” group

Posted in

Hi,

I’m setting up a “private” self-hosted WordPress site to share my photos and videos with family and friends. I’ve managed to purchase and install the Widget Control Pro and Groups plugins, and have been able to apply the use of groups to successfully to restrict my posts and media attachment page content from the Internet at large. I’m aware the direct media URLs are unprotected at with this scheme, but they can’t really be guessed externally, and it does allow me easily share a specific image/video with un-registered individuals.

So in a nutshell, “all good.” However, this scheme implies that I need to remember to always manually assign at least one group ID to every post and media file, lest it remain unprotected. To avoid the potential for mishap — is there any way to configure the system to automatically apply the built-in “Registered” group ID for every new post and media upload?

J. Wilson

3 Responses to Defaulting new posts and media uploads to use “Registered” group

  1. antonio August 15, 2017 at 7:56 am #

    Hi Jason,
    You can use the Groups API and this code as reference (you need to change the $group_id).
    Kind Regards,
    Antonio B.

    • Jason August 15, 2017 at 9:10 am #

      Thanks for the quick reply, Antonio! The code example that you linked appears to handle the “new post” use case. Can you offer guidance on how to similarly address any/all new media uploads as well?

      Jason

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share