Update:
i’ve tried to show the sharing button using print sharing_display();
between <ul>
tag in $share
but doesn’t work as i want. Sharing button was displayed above my post but not in the picture overlay.
This is the code someone have an idea? how can i force to show the sharing button in the overlay div?
$share = '';
# Sharing_Service is a JetPack class and it must be installed for sharing to work.
if (class_exists('Sharing_Service') && $this->options['show_sharing']) {
$layer_has_info = true;
$sharer = new Sharing_Service();
$enabled = $sharer->get_blog_services();
$this->share_img_url = $val['permalink'];
$i = 0;
$div = '<div class="galleria-layeritem sharedaddy sd-sharing-enabled '.
'robots-nocontent sd-block sd-social sd-social-icon sd-sharing '.
'sd-content">';
$share = $div.'<ul>';
foreach ($enabled['visible'] as $id => $service) {
$share .= '<li class="share-' . $service->get_class() . '">' . $service->get_display( $post ) . '</li>';
++$i;
if ($i % 2 == 0) {
$share .= '</ul></div>'.$div.'<ul>';
}
}
$share .= '</ul></div>';
$this->share_img_url = '';
//$this->ob_log($share);
}
}
$this->json .= "{id: ".$val['post_id'].
", image: '".$key.
"', thumb: '".$thumb.
"', permalink: '".$bookmark."'";
if ($layer_has_info) {
$this->json .= ', layer: \'<div class="galleria-infolayer">'.
'<div class="galleria-layeritem" style="padding-right: 20px;">'.
$title.$caption.$description.$info.'</div>'.
$link.$map.$bookmark.
'<div class="galleria-layeritem" style="padding-right: 20px;"></div>'.$share."'";
}
if ($extra) {
foreach (array("thumbnail", "medium", "large", "full") as $size) {
$img = wp_get_attachment_image_src($val['post_id'], $size);
$this->json .= ", ".$size.": ['".$img[0]."', ".$img[1].", ".$img[2]."]";
}
}
$this->json .= "},\n";
$images[$key]['id'] = $val['post_id'];
}
}
$this->json = rtrim($this->json, ",\n");
$this->json .= "\n],\n";
}