WordPress File Manager Plugin (CMDM) - Advanced - Creating New Downloads From Uploaded Files

Creating New Downloads From Uploaded Files (Advanced)

Back to User Guides

What is This Feature

You can make it so that every file uploaded in WordPress becomes a download managed by WordPress File Manager plugin.

This process is intended for developers.


This feature requires you to develop a file upload function. All that's necessary is to pass the file name to the hook.

Example Filter

$new_download = apply_filters('cmdm_custom_file_to_download', $new_download, $file_data);
$new_download - url to or ID of new created download item
$file_data - array of file data to be processed by CMDM plugin, its structure:
$file_data = array(
	'file_path' => 'path to origin file including file name and extension',
	'title'     => 'title of new created download',
	'user'      => get_current_user_id(), // author ID
	'result'    => 'permalink', // may have 2 options
'permalink' - output will be link to new download
'id' - output will be post id of new download 
	'category'  => 'category name'

Default Values

  • 'title' - file name
  • 'user' - current user ID
  • 'result' - 'permalink'
  • 'category' => NULL // no category

More information about the WordPress File Manager Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.