xclusive_first_gallery_image

Description

The “xclusive_first_gallery_image” filter allows to change the default gallery image displayed in archive pages. Version 1.1.0+.

A plugin (or theme) can add a filter with the code:

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

The hook is located in the _inc/custom.php file.

Example

// apply action
function filter_xclusive_first_gallery_image( $image_link, $images, $image ) {
return '<a class="image url" title="title" href="#" rel="bookmark">'. $image .'</a>';
}
add_filter('xclusive_first_gallery_image', 'filter_xclusive_first_gallery_image', 20, 3);

Note: $image_link is a string, $images is an array, $image is a string.


Comments

Leave a Reply

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