function ssba_google($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // google share link
    $htmlShareButtons .= '<a id="ssba_google_share" href="https://plus.google.com/share?url=' . $urlCurrentPage . '" ' . ($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="Google+" class="ssba" alt="Google+" src="' . WP_PLUGIN_URL . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/google.png" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img title="Google+" class="ssba" src="' . $arrSettings['ssba_custom_google'] . '" alt="Google+" />';
    }
    // 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">' . getGoogleShareCount($urlCurrentPage) . '</span>';
    }
    // return share buttons
    return $htmlShareButtons;
}
示例#2
0
function ssba_google($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    // google share link
    $htmlShareButtons = '<a data-site="" class="ssba_google_share" href="https://plus.google.com/share?url=' . $urlCurrentPage . '" ' . ($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'] . '/google.png" title="Google+" class="ssba ssba-img" alt="Share on Google+" />';
    } else {
        // show custom image
        $htmlShareButtons .= '<img src="' . $arrSettings['ssba_custom_google'] . '" title="Share on Google+" class="ssba ssba-img" alt="Google+" />';
    }
    // 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">' . getGoogleShareCount($urlCurrentPage) . '</span>';
        // add to our db
        updateSharedCount('G+', $urlCurrentPage);
    }
    // return share buttons
    return $htmlShareButtons;
}
/**
 * Create Google+ Share Button
 **/
function sssp_google($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount)
{
    $var_btn_cls = $booShowShareCount ? 's3d google' : 's3d google no-counter';
    $htmlShareButtons = '<a class="' . $var_btn_cls . '" href="https://plus.google.com/share?url=' . $urlCurrentPage . '" ' . ($arrSettings['sssp_share_new_window'] == 'yes' ? ' target="_blank" ' : NULL) . ($arrSettings['sssp_rel_nofollow'] == 'yes' ? ' rel="nofollow" ' : NULL) . '>';
    $htmlShareButtons .= '<span><i class="fa fa-google"></i></span>';
    if ($booShowShareCount) {
        $htmlShareButtons .= '<span class="counter">' . number_format(getGoogleShareCount($urlCurrentPage)) . '</span>';
    }
    $htmlShareButtons .= '</a>';
    return $htmlShareButtons;
}