Checking whether a download is "members-only"
-
Hi,
I’m listing several downloads on a page. Some of which are “members” only some of which are not. Is there a way for me to check if a download is members only (NOT whether or not you’re logged in). I’ve seen lots of reference to apply_filters( ‘dlm_can_download’). I’m looking to do something similar as @smashBrando is doing here:
global $post, $download; function is_protected_download( $post, $download ) { $can_download = true; return $can_download; add_filter( 'dlm_can_download', 'is_protected_download', 1, 2 );
Then (I know this syntax isn’t correct) in my template I want to do something like this:
`
if(is_protected_download()){
//do stuff});
Can someone help explain how to do this correctly?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Checking whether a download is "members-only"’ is closed to new replies.