Title: Use hook with own access function
Last modified: August 22, 2016

---

# Use hook with own access function

 *  Resolved [Marcel Bootsman](https://wordpress.org/support/users/mbootsman/)
 * (@mbootsman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/use-hook-with-own-access-function/)
 * Mike,
 * I have a question.
    Is it possible to use a hook before the actual download starts,
   to use a custom function to check access permissions? This function is already
   built, just need to know if there is a hook that I can use.
 * [https://wordpress.org/plugins/download-monitor/](https://wordpress.org/plugins/download-monitor/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [Marcel Bootsman](https://wordpress.org/support/users/mbootsman/)
 * (@mbootsman)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/use-hook-with-own-access-function/#post-5499937)
 * Solved. Thanks for this great plugin Mike!
 * Used the dlm_can_download filter with this code:
 *     ```
       function nstrm_golf_access( $post, $download ) {
   
       	if (golfClass::is_loggedin()) {
       		$can_download = true;
       	}
   
       	return $can_download;
       }
       add_filter( 'dlm_can_download', 'nstrm_golf_access', 1, 2 );
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Use hook with own access function’ is closed to new replies.

 * ![](https://ps.w.org/download-monitor/assets/icon-256x256.png?rev=3198936)
 * [Download Monitor](https://wordpress.org/plugins/download-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/download-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/download-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/download-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/download-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/download-monitor/reviews/)

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 1 reply
 * 1 participant
 * Last reply from: [Marcel Bootsman](https://wordpress.org/support/users/mbootsman/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/use-hook-with-own-access-function/#post-5499937)
 * Status: resolved