• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Download Monitor & Manager Plugin

Simple Download Monitor & Manager for WordPress

  • Home
  • Documentation
  • Addons/Extensions
  • Login
    • Sign In
    • Edit Profile
    • My Downloads
  • Support
    • Tutorials
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration
  • Contact Us
You are here: Home / Simple Download Monitor – Action Hook Reference

Simple Download Monitor – Action Hook Reference

Below is a list of action hooks that are available in the Simple Download Monitor plugin.

Note: This documentation is intended for developers only. It requires advanced coding knowledge.

Table of Contents

  • sdm_process_download_request
  • sdm_downloads_post_type_before_register

sdm_process_download_request

Can be used to to hook into the download request and override it with your custom coding.

Below is an example snippet of code showing how you can override the download process:

add_action('sdm_process_download_request', 'custom_download', 10, 2);
function custom_download($download_id, $download_link){
    //TODO - handle the dispatching of the download
    //exit here after the dispatching so the download sequence ends
}

sdm_downloads_post_type_before_register

This action hook can be used to customize/override the downloads slug base.

The default downloads slug is “sdm_downloads”. The following code example shows how this can be changed to “my-sdm-slug”:

function sdm_handle_change_downloads_slug( $args ) {
    $args['rewrite'] = array( 'slug' => 'my-sdm-slug' );
    return $args;
}
add_action( 'sdm_downloads_post_type_before_register', 'sdm_handle_change_downloads_slug' );

Note: If you use the above custom tweak, you will need to go to the “Permalinks” menu of your WordPress dashboard and re-save it. Saving the “Permalinks” settings forces your site to flush the re-write rules (which is required for this change to take effect).

Primary Sidebar

Featured Addons

  • Squeeze Form Addon
  • Hidden Downloads Addon
  • Amazon S3 Integration

Support Links

  • Support Forum

Search

Featured Plugin

WP Express Checkout Plugin

Start managing and tracking your file downloads with the simple download monitor plugin. Download Now

Copyright © 2025 | Simple Download Monitor | A member of the Tips and Tricks HQ family.