Hi,
Please paste this code at functions.php of child theme.
function sf_gallery_item_link($link_type, $id = 0) {
$link_config = $link_script = $item_icon = "";
global $post, $sf_options;
$lightbox_nav = $sf_options['lightbox_nav'];
$lightbox_thumbs = $sf_options['lightbox_thumbs'];
$lightbox_skin = $sf_options['lightbox_skin'];
$lightbox_sharing = $sf_options['lightbox_sharing'];
if ($link_type == "page") {
$link_config = 'href="'.get_permalink().'" class="link-to-url"';
$item_icon = apply_filters('sf_gallery_page_icon', "ss-navigateright");
} else if ($link_type == "lightbox") {
$gallery_images = rwmb_meta( 'sf_gallery_images', 'type=image&size=gallery-image');
$link_config = 'id="gallery-'.$id.'" href="#" class="gallery-lightbox"';
$item_icon = apply_filters('sf_gallery_lightbox_icon', "ss-view");
$link_script .= "<script>jQuery(document).ready(function(){jQuery('#gallery-".$id."').click(function(){
var lightboxSocial = {
facebook: true,
twitter: true,
googleplus: true,
pinterest: {
source: 'https://pinterest.com/pin/create/bookmarklet/?url={URL}',
text: 'Share on Pinterest'
}
};
jQuery.iLightBox(
[";
foreach ( $gallery_images as $image ) {
$link_script .= "{
URL: '".$image['full_url']."',
type: 'image',
title: '".$image['title']."',
caption: '".$image['description']."'
},";
}
$link_script .= "],
{";
if ($lightbox_skin == "dark") {
$link_script .= "skin: 'metro-black',";
} else {
$link_script .= "skin: 'metro-white',";
}
$link_script .= "controls: {";
if ($lightbox_nav == "arrows") {
$link_script .= "arrows: true,";
}
if (!$lightbox_thumbs) {
$link_script .= "thumbnail: false";
}
$link_script .= "},";
if ($lightbox_sharing) {
$link_script .= "social: {
buttons: lightboxSocial
},";
}
$link_script .= "path: 'horizontal',
thumbnails: {
maxWidth: 120,
maxHeight: 120
},
}
);
return false;
});
});";
$link_script .= "</script>";
}
$item_link = array(
"icon" => $item_icon,
"config" => $link_config,
"script" => $link_script
);
return $item_link;
}
Thanks
Mohammad