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 3332
/class/class-wp-folder-option.php line 250

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 1337
/class/class-media-folder.php line 1813
/class/class-media-folder.php line 1856
/class/class-media-folder.php line 2216
/class/class-media-folder.php line 2275
/class/class-media-folder.php line 3001
/class/class-wp-folder-option.php line 467
/class/class-wp-folder-option.php line 2130

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 1314
/class/class-media-folder.php line 1958
/class/class-wp-folder-option.php line 313
/class/class-wp-folder-option.php line 414
/class/class-wp-folder-option.php line 2025
/class/class-wp-folder-option.php line 2059

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 2086
/class/class-media-folder.php line 2150

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 2351
/class/class-wp-folder-option.php line 1696

wpmf_update_folder_name

Update folder name

Parameters :

integer Folder ID
string Updated name

Return :

void

In files :

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

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 277
/class/class-wp-folder-option.php line 564

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 3112