Created
March 12, 2014 10:14
-
-
Save tomhemsley/9504185 to your computer and use it in GitHub Desktop.
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
/** | |
* INSTALLATION: this code should be pasted into your theme's functions.php file. | |
* | |
* USAGE: | |
* Install 'Responsive Lightbox'. | |
* Add an image slide to your Meta Slider slideshow and enter the Vimeo URL in the URL field | |
*/ | |
function metaslider_respoonsive_lightbox_vimeo($attributes, $slide, $slider_id) { | |
if (strpos($attributes['href'], 'vimeo.com') !== false) { | |
$attributes['rel'] = "lightbox-video-{$slide['id']}"; | |
} | |
return $attributes; | |
} | |
add_filter('metaslider_flex_slider_anchor_attributes', 'metaslider_respoonsive_lightbox_vimeo', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment