ims_image_custom_column

Description

The “ims_image_custom_column” filter is used modify or add content to a custom column added by register_column_headers( ‘ims_gallery’, $ImStore->columns ).

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

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

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

Example

// Apply filter
function add_ims_image_custom_column( $column_id, $image_id, $image_data, $attachment ) {
	if( $column_id == "custom_column" )
		return "Content for custom column";
}
add_filter('ims_image_custom_column', 'add_ims_image_custom_column');

Note:  $column_id is string or integer, $image_id is an integer, $image_data 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 *