function sfsi_social_buttons_below($content)
{
    global $post;
    $sfsi_section6 = unserialize(get_option('sfsi_section6_options', false));
    /* check if option activated in admin or not */
    if ($sfsi_section6['sfsi_show_Onposts'] == "yes") {
        $permalink = get_permalink($post->ID);
        $title = get_the_title();
        $sfsiLikeWith = "45px;";
        /* check for counter display */
        if ($sfsi_section6['sfsi_icons_DisplayCounts'] == "yes") {
            $show_count = 1;
            $sfsiLikeWith = "75px;";
        } else {
            $show_count = 0;
        }
        $txt = isset($sfsi_section6['sfsi_textBefor_icons']) ? $sfsi_section6['sfsi_textBefor_icons'] : "Share this Post with :";
        $float = $sfsi_section6['sfsi_icons_alignment'];
        $icons = "<div class='sfsi_Sicons' style='float:" . $float . "'><div style='float:left;margin:5px;'><span>" . $txt . "</span></div>";
        //adding wrapper div
        $icons .= "<div class='sfsi_socialwpr'>";
        $icons .= "<div class='sf_fb' style='width:" . $sfsiLikeWith . "'>" . sfsi_FBlike($permalink, $show_count) . "</div>";
        $icons .= "<div class='sf_google'>" . sfsi_googlePlus($permalink, $show_count) . "</div>";
        $icons .= "<div class='sf_addthis'>" . sfsi_Addthis($show_count) . "</div>";
        $icons .= "</div>";
        //closing wrapper div
        $icons .= "</div>";
        if (!is_feed() && !is_home() && !is_page()) {
            $content = $content . $icons;
        }
    }
    return $content;
}
Esempio n. 2
0
function sfsi_social_buttons_below($content)
{
    global $post;
    $sfsi_section6 = unserialize(get_option('sfsi_section6_options', false));
    //checking for standard icons
    if (!isset($sfsi_section6['sfsi_rectsub'])) {
        $sfsi_section6['sfsi_rectsub'] = 'no';
    }
    if (!isset($sfsi_section6['sfsi_rectfb'])) {
        $sfsi_section6['sfsi_rectfb'] = 'yes';
    }
    if (!isset($sfsi_section6['sfsi_rectgp'])) {
        $sfsi_section6['sfsi_rectgp'] = 'yes';
    }
    if (!isset($sfsi_section6['sfsi_rectshr'])) {
        $sfsi_section6['sfsi_rectshr'] = 'yes';
    }
    if (!isset($sfsi_section6['sfsi_recttwtr'])) {
        $sfsi_section6['sfsi_recttwtr'] = 'no';
    }
    if (!isset($sfsi_section6['sfsi_rectpinit'])) {
        $sfsi_section6['sfsi_rectpinit'] = 'no';
    }
    if (!isset($sfsi_section6['sfsi_rectfbshare'])) {
        $sfsi_section6['sfsi_rectfbshare'] = 'no';
    }
    //checking for standard icons
    /* check if option activated in admin or not */
    if ($sfsi_section6['sfsi_show_Onposts'] == "yes") {
        $permalink = get_permalink($post->ID);
        $title = get_the_title();
        $sfsiLikeWith = "45px;";
        /* check for counter display */
        if ($sfsi_section6['sfsi_icons_DisplayCounts'] == "yes") {
            $show_count = 1;
            $sfsiLikeWith = "125px;";
        } else {
            $show_count = 0;
        }
        $txt = isset($sfsi_section6['sfsi_textBefor_icons']) ? $sfsi_section6['sfsi_textBefor_icons'] : "Please follow and like us:";
        $float = $sfsi_section6['sfsi_icons_alignment'];
        if ($sfsi_section6['sfsi_rectsub'] == 'yes' || $sfsi_section6['sfsi_rectfb'] == 'yes' || $sfsi_section6['sfsi_rectgp'] == 'yes' || $sfsi_section6['sfsi_rectshr'] == 'yes' || $sfsi_section6['sfsi_recttwtr'] == 'yes' || $sfsi_section6['sfsi_rectpinit'] == 'yes' || $sfsi_section6['sfsi_rectfbshare'] == 'yes') {
            $icons = "<div class='sfsi_Sicons' style='width: 100%; display: inline-block; vertical-align: middle; text-align:" . $float . "'><div style='margin:0px 8px 0px 0px; line-height: 24px'><span>" . $txt . "</span></div>";
        }
        //adding wrapper div
        $icons .= "<div class='sfsi_socialwpr'>";
        if ($sfsi_section6['sfsi_rectsub'] == 'yes') {
            if ($show_count) {
                $sfsiLikeWithsub = "93px";
            } else {
                $sfsiLikeWithsub = "64px";
            }
            if (!isset($sfsiLikeWithsub)) {
                $sfsiLikeWithsub = $sfsiLikeWith;
            }
            $icons .= "<div class='sf_subscrbe' style='text-align:left;float:left;width:" . $sfsiLikeWithsub . "'>" . sfsi_Subscribelike($permalink, $show_count) . "</div>";
        }
        if ($sfsi_section6['sfsi_rectfb'] == 'yes' || $sfsi_section6['sfsi_rectfbshare'] == 'yes') {
            if ($sfsi_section6['sfsi_rectfb'] == 'yes') {
                if ($show_count) {
                    $sfsiLikeWithfb = "80px";
                } else {
                    $sfsiLikeWithfb = "52px";
                }
            }
            if ($sfsi_section6['sfsi_rectfbshare'] == 'yes') {
                if ($show_count) {
                    $sfsiLikeWithfb = "88px";
                } else {
                    $sfsiLikeWithfb = "60px";
                }
            }
            if ($sfsi_section6['sfsi_rectfb'] == 'yes' && $sfsi_section6['sfsi_rectfbshare'] == 'yes') {
                if ($show_count) {
                    $sfsiLikeWithfb = "125px";
                } else {
                    $sfsiLikeWithfb = "98px";
                }
            }
            $icons .= "<div class='sf_fb' style='text-align:left;width:" . $sfsiLikeWithfb . "'>" . sfsi_FBlike($permalink, $show_count) . "</div>";
        }
        if ($sfsi_section6['sfsi_recttwtr'] == 'yes') {
            if ($show_count) {
                $sfsiLikeWithtwtr = "62px";
            } else {
                $sfsiLikeWithtwtr = "62px";
            }
            if (!isset($sfsiLikeWithtwtr)) {
                $sfsiLikeWithtwtr = $sfsiLikeWith;
            }
            $icons .= "<div class='sf_twiter' style='text-align:left;float:left;width:auto'>" . sfsi_twitterlike($permalink, $show_count) . "</div>";
        }
        if ($sfsi_section6['sfsi_rectpinit'] == 'yes') {
            $sfsi_pinwidth = "47px";
            if ($show_count) {
                $sfsi_pinwidth = "95px";
            } else {
                $sfsi_pinwidth = "47px";
            }
            $icons .= "<div class='sf_pinit' style='text-align:left;float:left;width:" . $sfsi_pinwidth . "'>" . sfsi_pinterest($permalink, $show_count) . "</div>";
        }
        if ($sfsi_section6['sfsi_rectgp'] == 'yes') {
            $icons .= "<div class='sf_google' style='text-align:left;float:left;max-width:62px;min-width:35px;'>" . sfsi_googlePlus($permalink, $show_count) . "</div>";
        }
        if ($sfsi_section6['sfsi_rectshr'] == 'yes') {
            $icons .= "<div class='sf_addthis'>" . sfsi_Addthis($show_count, $permalink, $title) . "</div>";
        }
        $icons .= "</div>";
        //closing wrapper div
        $icons .= "</div>";
        if (!is_feed() && !is_home() && !is_page()) {
            $content = $content . $icons;
        }
    }
    return $content;
}