Created
September 15, 2014 12:29
-
-
Save tomhemsley/fe9ed89de1ff984b62e2 to your computer and use it in GitHub Desktop.
Custom Caption
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
function metaslider_custom_caption($slide, $slideshow_id) { | |
// populate the caption using other fields | |
$slide['caption'] = $slide['caption'] . $slide['title'] . $slide['alt']; | |
return $slide; | |
} | |
add_filter('metaslider_image_slide_attributes', 'metaslider_custom_caption',10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment