Exemplo n.º 1
0
function showShareButtons($post_data)
{
    if (get_custom_option('show_share') == 'yes') {
        $socials = get_theme_option('share_buttons');
        $arr = explode(',', $socials);
        $list = array();
        foreach ($arr as $s) {
            if (empty($s)) {
                continue;
            }
            $s = explode('|', $s);
            //if (count($s)!=3 || empty($s[0])) continue;
            if (count($s) != 3) {
                continue;
            }
            $list[$s[2]] = array('url' => $s[0]);
        }
        if (count($list) > 0) {
            ?>
			<div class="post_info post_info_bottom theme_text">
				<?php 
            showShareSocialLinks(array('post_id' => $post_data['post_id'], 'post_link' => $post_data['post_link'], 'post_title' => $post_data['post_title'], 'post_descr' => $post_data['post_descr'], 'post_thumb' => $post_data['post_thumb'], 'caption' => get_theme_option('share_caption'), 'share' => $list, 'counters' => get_theme_option('show_share_counters') == 'yes', 'direction' => get_custom_option('body_style') == 'fullwidth' ? 'horizontal' : get_theme_option('share_direction')));
            ?>
			</div>
			<?php 
        }
    }
}
Exemplo n.º 2
0
 function showShareButtons($post_data)
 {
     $rez = '';
     if (get_custom_option('show_share') == 'yes') {
         $socials = get_theme_option('share_buttons');
         if (is_array($socials) && count($socials) > 0 && implode('', $socials[0]) != '') {
             $rez = showShareSocialLinks(array('echo' => false, 'post_id' => $post_data['post_id'], 'post_link' => $post_data['post_link'], 'post_title' => $post_data['post_title'], 'post_descr' => $post_data['post_descr'], 'post_thumb' => $post_data['post_thumb'], 'caption' => get_theme_option('share_caption'), 'share' => $socials, 'counters' => get_theme_option('show_share_counters') == 'yes', 'direction' => get_theme_option('share_direction'), 'style' => !empty($post_data['style']) ? $post_data['style'] : 'block'));
         }
     }
     if ($rez && !empty($post_data['echo']) && $post_data['echo']) {
         echo balanceTags($rez);
     }
     return $rez;
 }