Last active
August 29, 2015 14:01
-
-
Save jartes/1e4e7862b2a2330d7a67 to your computer and use it in GitHub Desktop.
Ejemplo callback FlexSlider Infinite Scroll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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