backstretch_gallery_override

Description

In the event that you need to force a particular post / page / category etc to have a specific gallery loaded, this filter allows you to set that. This will override any settings saved in the plugin or individual content.

Usage

Load the images

function rkv_gallery_override( $images ) {

	$images	= array(
		MY_DOMAIN.'/images/my-gallery-override-1.jpg',
		MY_DOMAIN.'/images/my-gallery-override-2.jpg',
		MY_DOMAIN.'/images/my-gallery-override-3.jpg',
		);

	return $images;
}
add_filter( 'backstretch_gallery_override', 'rkv_gallery_override');

Load the images for just a category

function rkv_gallery_category_override( $images ) {

	if ( is_category( 'MY-CATEGORY-SLUG' ) ) {

		$images	= array(
			MY_DOMAIN.'/images/my-gallery-override-1.jpg',
			MY_DOMAIN.'/images/my-gallery-override-2.jpg',
			MY_DOMAIN.'/images/my-gallery-override-3.jpg',
		);

	}	

	return $images;

}
add_filter( 'backstretch_gallery_override', 'rkv_gallery_category_override');