ims_pre_get_images

Description

The “ims_pre_get_images” filter is used to modify arguments pass to the WP_Query object before the gallery images are obtained.

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

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

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

Example

// Apply filter
function modify_ims_get_galleries( $args ) {
$args['paged'] = 30; // display 30 images per page
return $args;
}
add_filter('ims_pre_get_images', 'modify_ims_get_images');

Note: $args is an array that must match values used by the WP_Query object.


Comments

Leave a Reply

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