ims_image_tag_buttons

Description

The “ims_image_tag_buttons” filter is used to add buttons or HTML below each image.

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

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

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

Example

// Apply filter
function add_ims_image_tag_buttons( $buttons, $data, $img_id, $enc, $size ) {
return $buttons['custom'] = '<a href="#">'.__('custom button').'</a>';
}
add_filter('ims_image_tag_buttons', 'add_ims_image_tag_buttons');

Note: $buttons is an associative array, $data is an associative array, $enc is an string, $size is an integer.


Comments

Leave a Reply

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