Main Menu
Sub Menu

wpdm_allowed_roles

Description


The wpdm_allowed_roles filter is used to modify the list of user roles allowed to download a specific package.

Parameters


Two parameters are passed to this hook.

Usage


 

<?php add_filter('wpdm_allowed_roles', 'my_wpdm_allowed_roles', 10, 2); ?>

Examples



<?php
add_filter('wpdm_allowed_roles', 'my_wpdm_allowed_roles', 10, 2);

function my_wpdm_allowed_roles($roles, $id) { 
    $roles[] = 'editor';
    return $roles;
}

?>
Last updated on Dec 7, 2025

Need More Clarification?

For any technical issue, if you are already using pro version please post in pro forum and free version users please post in free forum. Otherwise, if you have any pre-sale or order related query please contact live chat support team. For technical support.

Need Customization?

If you need additional customization on WordPress Download Manager or any type of custom support on WordPress you may contact our customization service.