WP Media Folder Developer Documentation

This documentation will help experienced developers to plug any other service with our plugin. Here are all actions and filters for this plugin, if you need some more, feel free to ask by using this for dedicated forum. Thanks for using our plugin!

wpmf_add_attachment

Create an attachment when importing or syncing files from FTP
This hook is also used when a remote video is created

Parameters :

integer Created attachment ID
integer|array Target folder or array of target folders
array Extra informations

Return :

void

In files :

/class/class-media-folder.php line 3330
/class/class-wp-folder-option.php line 214

wpmf_attachment_set_folder

Set attachment folder after moving an attachment to a folder in the media manager
This hook is also used when importing attachment to categories, after an attachment upload and
when assigning multiple folder to an attachment

Parameters :

integer Attachment ID
integer|array Target folder or array of target folders
array Extra informations

Return :

void

In files :

/class/class-media-folder.php line 299
/class/class-media-folder.php line 1363
/class/class-media-folder.php line 1839
/class/class-media-folder.php line 2205
/class/class-media-folder.php line 2264
/class/class-media-folder.php line 2982
/class/class-wp-folder-option.php line 431
/class/class-wp-folder-option.php line 2190

wpmf_create_folder

Create a folder from media library
This hook is also used when syncing and importing files from FTP, creating user and role based folders
and importing from Nextgen Gallery

Parameters :

integer Created folder ID
string Created folder name
integer Parent folder ID
array Extra informations

Return :

void

In files :

/class/class-media-folder.php line 1340
/class/class-media-folder.php line 1947
/class/class-wp-folder-option.php line 277
/class/class-wp-folder-option.php line 378
/class/class-wp-folder-option.php line 2085
/class/class-wp-folder-option.php line 2119

wpmf_delete_folder

Delete a folder

Parameters :

WP_Term Folder, this term is not available anymore as it as been deleted

Return :

void

In files :

/class/class-media-folder.php line 2075
/class/class-media-folder.php line 2139

wpmf_duplicate_attachment

Duplicate an attachment

Parameters :

integer Attachment ID
integer Target folder

Return :

void

In files :

/class/class-duplicate-file.php line 103

wpmf_move_folder

Move a folder from media library
This hook is also used when role folder option is changed

Parameters :

integer Folder moved ID
string Destination folder ID
array Extra informations

Return :

void

In files :

/class/class-media-folder.php line 2337
/class/class-wp-folder-option.php line 1759

wpmf_update_folder_name

Update folder name

Parameters :

integer Folder ID
string Updated name

Return :

void

In files :

/class/class-media-folder.php line 2011

wpmf_import_allowed_filetypes

Filter the filetype allowed to be imported through ftp or folder import

Parameters :

array Filetypes allowed to be imported

Return :

array

In files :

/class/class-wp-folder-option.php line 241
/class/class-wp-folder-option.php line 528

wpmf_set_file_title

Manipulate file title before saving it into database

Parameters :

string File title

Return :

string

In files :

/class/class-media-folder.php line 3093

JUST IN TIME, WP MEDIA FOLDER 4TH ANNIVERSARY SUPER SALE!
25% OFF on WP Media Folder and WordPress Bundle - 18 Sept. to 25 Sept.
COUPON: WPMF4TH

WPMF 4th Anniversary NL

4 years ago we've launched WP Media Folder, our WordPress media manager plugin.
What a success, 17000 users and 90 versions later, we would like to share this with you.