I have a pretty straight-forward Wordpress site that uses a plugin called Subway to restrict access on the page only to logged in users. There's also the following .htaccess-rule:
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC]
I can define access depending on user role very easily. However, it doesn't seem to work so well with Media attachments.
I am a bit new to Filters in Wordpress, but shouldn't there be a way to restrict access to a file based on a user's user role via functions.php?
Thanks!