function ssba_linkedin($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount) { // linkedin share link $htmlShareButtons .= '<a id="ssba_linkedin_share" class="ssba_share_link" href="http://www.linkedin.com/shareArticle?mini=true&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="Linkedin" class="ssba" alt="LinkedIn" src="' . WP_PLUGIN_URL . '/simple-share-buttons-adder/buttons/' . $arrSettings['ssba_image_set'] . '/linkedin.png" />'; } else { // show custom image $htmlShareButtons .= '<img title="LinkedIn" class="ssba" src="' . $arrSettings['ssba_custom_linkedin'] . '" alt="LinkedIn" />'; } // close href $htmlShareButtons .= '</a>'; // if show share count is set to Y if ($arrSettings['ssba_show_share_count'] == 'Y' && $booShowShareCount == true) { // get and display share count $htmlShareButtons .= '<span class="ssba_sharecount">' . getLinkedinShareCount($urlCurrentPage) . '</span>'; } // return share buttons return $htmlShareButtons; }
function ssba_linkedin($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount) { // linkedin share link $htmlShareButtons = '<a data-site="linkedin" class="ssba_linkedin_share ssba_share_link" href="http://www.linkedin.com/shareArticle?mini=true&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'] . '/linkedin.png" title="LinkedIn" class="ssba ssba-img" alt="Share on LinkedIn" />'; } else { // show custom image $htmlShareButtons .= '<img src="' . $arrSettings['ssba_custom_linkedin'] . '" alt="Share on LinkedIn" title="LinkedIn" 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) { // get and display share count $htmlShareButtons .= '<span class="ssba_sharecount">' . getLinkedinShareCount($urlCurrentPage) . '</span>'; // add to our db updateSharedCount('linkedin', $urlCurrentPage); } // return share buttons return $htmlShareButtons; }
/** * Create Linkedin Share Button **/ function sssp_linkedin($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount) { $var_btn_cls = $booShowShareCount ? 's3d linkedin' : 's3d linkedin no-counter'; $htmlShareButtons = '<a class="' . $var_btn_cls . '" href="http://www.linkedin.com/shareArticle?mini=true&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-linkedin"></i></span>'; if ($booShowShareCount) { $htmlShareButtons .= '<span class="counter">' . number_format(getLinkedinShareCount($urlCurrentPage)) . '</span>'; } $htmlShareButtons .= '</a>'; return $htmlShareButtons; }