Created
May 19, 2015 22:01
-
-
Save halgatewood/25928d84f8a07006c06c to your computer and use it in GitHub Desktop.
Adding CycleTwo Data Arguments to the Testimonial Rotator
This file contains 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
// ALL DATA ELEMENTS ARE FOUND HERE: http://jquery.malsup.com/cycle2/api/ | |
// ADD data-cycletwo- TO THE BEGINNING | |
// NO WRAP FOR ALL ROTATORS | |
function hg_testimonial_rotator_data_attributes( $default, $template_name, $id ) | |
{ | |
return " data-cycletwo-allow-wrap='false' "; | |
} | |
add_filter('testimonial_rotator_data_attributes', 'hg_testimonial_rotator_data_attributes', 10, 3 ); | |
// TARGET SPECIFIC ROTATORS | |
// WRAP ONLY ROTATOR ID 100 | |
function hg_testimonial_rotator_data_attributes( $default, $template_name, $id ) | |
{ | |
if( $id == 100 ) return " data-cycletwo-allow-wrap='false' "; | |
else return ""; | |
} | |
add_filter('testimonial_rotator_data_attributes', 'hg_testimonial_rotator_data_attributes', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment