ims_image_row_actions_metadata

Description

The “ims_image_row_actions_metadata” filter is used add actions (links) to the image metadata column.

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

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

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

Example

// Apply filter
function add_ims_image_row_actions_metadata( $output, $image_id, $image_data, $attachment  ) {
return '<a href="/some-action" class="mylink-class">' . __( 'My link' ) . '</a>';
}
add_filter('ims_image_row_actions_metadata', 'add_ims_image_row_actions_metadata');

Note: $output is a HTML string, $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();


Comments

Leave a Reply

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