function ssba_stumbleupon($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // stumbleupon share link
    $htmlShareButtons .= '<a id="ssba_stumbleupon_share" class="ssba_share_link" href="http://www.stumbleupon.com/submit?url=' . $urlCurrentPage . '&title=' . $strPageTitle . '" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? 'target="_blank"' : NULL) . '>';
    // if image set is not custom
    if ($arrSettings['ssba_image_set'] != 'custom') {
        // show ssba image
        $htmlShareButtons .= '<img title="StumbleUpon" class="ssba" alt="StumbleUpon" src="' . WP_PLUGIN_URL . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/stumbleupon.png" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img title="StumbleUpon" class="ssba" src="' . $arrSettings['ssba_custom_stumbleupon'] . '" alt="StumbleUpon" />';
    }
    // close href
    $htmlShareButtons .= '</a>';
    // if show share count is set to Y
    if ($arrSettings['ssba_show_share_count'] == 'Y' && $booShowShareCount == true) {
        $htmlShareButtons .= '<span class="ssba_sharecount">' . getStumbleUponShareCount($urlCurrentPage) . '</span>';
    }
    // return share buttons
    return $htmlShareButtons;
}
Beispiel #2
0
function ssba_stumbleupon($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // stumbleupon share link
    $htmlShareButtons = '<a data-site="stumbleupon" class="ssba_stumbleupon_share ssba_share_link" href="http://www.stumbleupon.com/submit?url=' . $urlCurrentPage . '&amp;title=' . $strPageTitle . '" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? ' target="_blank" ' : NULL) . ($arrSettings['ssba_rel_nofollow'] == 'Y' ? ' rel="nofollow" ' : NULL) . '>';
    // if image set is not custom
    if ($arrSettings['ssba_image_set'] != 'custom') {
        // show ssba image
        $htmlShareButtons .= '<img src="' . plugins_url() . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/stumbleupon.png" title="StumbleUpon" class="ssba ssba-img" alt="Share on StumbleUpon" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img src="' . $arrSettings['ssba_custom_stumbleupon'] . '" alt="Share on StumbleUpon" title="StumbleUpon" class="ssba ssba-img" />';
    }
    // close href
    $htmlShareButtons .= '</a>';
    // if show share count is set to Y
    if ($arrSettings['ssba_show_share_count'] == 'Y' && $booShowShareCount == true) {
        $htmlShareButtons .= '<span class="ssba_sharecount">' . getStumbleUponShareCount($urlCurrentPage) . '</span>';
        // add to our db
        updateSharedCount('stumbleupon', $urlCurrentPage);
    }
    // return share buttons
    return $htmlShareButtons;
}
/**
 * Create Stumbleupon Share Button
 **/
function sssp_stumbleupon($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    $var_btn_cls = $booShowShareCount ? 's3d stumbleupon' : 's3d stumbleupon no-counter';
    // stumbleupon share link
    $htmlShareButtons = '<a class="' . $var_btn_cls . '" href="http://www.stumbleupon.com/submit?url=' . $urlCurrentPage . '&amp;title=' . $strPageTitle . '" ' . ($arrSettings['sssp_share_new_window'] == 'yes' ? ' target="_blank" ' : NULL) . ($arrSettings['sssp_rel_nofollow'] == 'yes' ? ' rel="nofollow" ' : NULL) . '>';
    $htmlShareButtons .= '<span><i class="fa fa-stumbleupon"></i></span>';
    if ($booShowShareCount) {
        $htmlShareButtons .= '<span class="counter">' . number_format(getStumbleUponShareCount($urlCurrentPage)) . '</span>';
    }
    $htmlShareButtons .= '</a>';
    return $htmlShareButtons;
}