Skip to content

Instantly share code, notes, and snippets.

@dariodev
Created April 23, 2014 21:38
Show Gist options
  • Save dariodev/11233370 to your computer and use it in GitHub Desktop.
Save dariodev/11233370 to your computer and use it in GitHub Desktop.
add_filter( 'tgmsp_pre_load_slider', 'tgm_soliloquy_transform_to_gallery', 10, 5 );
/**
* Circumvents the slider output and allows access to raw format.
*
* @param bool $bool Boolen if the filter should be run. Default is false.
* @param int $id The slider ID being filtered.
* @param array $images Array of images in the slider.
* @param array $data Array of meta for the slider.
* @param int $count The current number of the slider on page (if there is more than one on the page).
* @return bool|string False if you want to keep a slider, HTML output for something else.
*/
function tgm_soliloquy_transform_to_gallery( $bool, $id, $images, $data, $count ) {
// Prepare your $gallery variable. All gallery HTML will be stored in here.
$gallery = '';
// Make all HTML stuff happen here.
// Return the $gallery variable to be output by Soliloquy.
return $gallery;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment