Skip to content

Instantly share code, notes, and snippets.

@jartes
Last active August 29, 2015 14:01
Show Gist options
  • Select an option

  • Save jartes/1e4e7862b2a2330d7a67 to your computer and use it in GitHub Desktop.

Select an option

Save jartes/1e4e7862b2a2330d7a67 to your computer and use it in GitHub Desktop.
Ejemplo callback FlexSlider Infinite Scroll
<?php
function add_intinite_scroll_callback( $options ) {
$options['callback'] .= '
jQuery(this).find(".flexslider").each(function(index) {
if ( jQuery(this).attr( "slider-loaded" ) === "0" ) {
if ( jQuery(this).attr( "slider-type" ) === "basico" ) {
var animation = jQuery(this).attr( "slider-animation" );
jQuery(this).flexslider({
animation: "+animation+"
});
jQuery(this).attr( "slider-loaded", "1" );
}
}
});
';
return $options;
}
add_filter( 'infinite_scroll_js_options', 'add_intinite_scroll_callback' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment