Description
Allows you to filter whether the user can download or not.
Parameters
$args
(array)(required) An array of arguments passed from handle_download().
key => The file’s key (a post meta value used to locate the file)
user_verified => boolean, If the user is verified to download the file, default: false
file_info => array (
post_id => The post ID
results => raw $results array from SQL select
post => The post object for this post ID
meta => All post meta for this post ID
raw_file => The basename() of the file path (returned from get_attached_file())
path => Path to the file’s download location
)
Usage
[snippet slug=wpmem_dp_verify lang=php]
Changelog
- Introduced in 1.0.0
Source
wpmem_block is located in includes/class-wp-members-download-protect.php