ims_upload_path

Description

The “ims_upload_path” filter is used to modify the path directories where images will be uploaded.

A plugin (or theme) can modify the array with the code:

<?php add_filter( 'ims_upload_path', 'filter_function_name' ); ?>

The hook is located in the image-store/_inc/galleries.php file.

Example

// Apply filter
function modify_ims_upload_path( $ims_paths, $wp_paths ) {
if( isset($wp_paths['subdir']) )
$ims_paths['subdir'] = $wp_paths['subdir'] // use default wp subpath
return $ims_paths; 
}
add_filter('ims_upload_path', 'modify_ims_upload_path');

Note: $ims_paths is an associative array of directory paths. $wp_paths is an associative array of containing WordPress default upload directory paths


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *