Created
February 4, 2013 19:31
-
-
Save emzo/4708969 to your computer and use it in GitHub Desktop.
Add slider slug name to css attributes of soliloquy container div
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
<?php | |
// Add slug in CSS class of all sliders | |
add_filter( 'tgmsp_slider_classes', 'clinicoftcm_slider_classes', 10, 2 ); | |
function clinicoftcm_slider_classes( $classes, $id ) { | |
$slider = get_post( $id, ARRAY_A ); | |
if( $slider['post_name'] ) | |
$classes[] = 'soliloquy-' . $slider['post_name']; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment