ims_async_upload

Description

The “ims_async_upload” filter is used to modify the output generated after and image is uploaded. Output can be html or an integer.

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

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

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

Example

// Apply filter
function modify_ims_async_upload( $attach_id, $metadata, $attachment ) {
	return $attach_id; // return attachment id to confirm image has been uploaded
}
add_filter('ims_async_upload', 'modify_ims_async_upload');

Note:  $attach_id is an integer, $metadata is multidimensional array returned by the “_wp_attachment_metadata” post meta option, $attachment is an object returned by get_post().


Leave a Reply

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