WP-Members Download Protect version 2.0.1 has been released. This is primarily a bug fix release.
This release fixes a bug in the download stats that causes a problem with pagination. If the view was filtered by individual user or file and the results had more than one page, the pagination for later pages was wrong and resulted in going back to the unfiltered view. This release fixes that bug.
This version adds to filters to filter the required user capability for certain actions.
First, the media page upload. Previously, in order to access the page to manage files handled by Download Protect, the user needed to have the manage_options capability. That is still the default, but it can now be filtered by the new wpmem_dp_media_page_cap filter hook to allow you to customize the necessary user capability. For example:
add_filter( 'wpmem_dp_media_cap', function( $capability ) {
return 'edit_users';
});
Similarly, the download stats required edit_users capability. The default capability has now been changed to list_users. This brings the capability down a little bit, although in the vast majority of use cases, custom roles with list_users also have edit_users caps. In testing, the list_users capability made more sense for this custom screen. Additionally, the default capability can be filtered with wpmem_dp_stats_page_cap. For example:
add_filter( 'wpmem_dp_stats_page_cap', function( $capability ) {
return 'edit_users';
});