FB; } elseif ($facebook_type === 'xfbml') { $markup = << FB; } else { $url = drupal_encode_path($url); $font = drupal_encode_path($font); $markup = << FB; } return $markup; } /** * Generate the needed markeup for the Google+ share link. * * @param $url The url to be shared * @param $type Generate horizontal or vertical widgets * @param $title The title to be shared * @return string the html markup */ function _easy_social_widget_googleplus_markup($url, $type, $title = NULL, $lang = 'und') { // This widget doesn't yet offer a localization option. // @TODO Use "callback" to track successful shares. This will likely be in // either a seperate module or a new version. $annotation = variable_get_value('easy_social_googleplus_annotation'); $type = ($type == EASY_SOCIAL_WIDGET_HORIZONTAL) ? 'medium' : 'tall'; $html5 = variable_get_value('easy_social_googleplus_html5'); if ($html5) { $markup = << GP; } else { $markup = << GP; } return $markup; } /** * Generate the needed markeup for the linkedin share link. * * @param $url The url to be shared * @param $type Generate horizontal or vertical widgets * @param $title The title to be shared * @return string the html markup */ function _easy_social_widget_linkedin_markup($url, $type, $title = NULL, $lang = 'und') { // This widget doesn't yet offer a localization option. // @TODO Use "data-onsuccess" to track successful shares this will likely be // in either a seperate module or a new version. $type = ($type == EASY_SOCIAL_WIDGET_HORIZONTAL) ? 'right' : 'top'; $type_show = variable_get_value('easy_social_linkedin_count_show'); if (!$type_show) $type = FALSE; $markup = <<
  • LI; return $markup; } /** * Generate the needed markup for the twitter share link. * * @param $url The url to be shared * @param $type Generate horizontal or vertical widgets * @param $title The title to be shared * @param $lang The language of the twitter button * @return string the html markup */ function _easy_social_widget_twitter_markup($url, $type, $title = NULL, $lang = 'und') { // Correct for different language identification strings. $lang = _easy_social_twitter_langcodes($lang); $type = ($type == EASY_SOCIAL_WIDGET_HORIZONTAL) ? 'horizontal' : 'vertical'; // Override the data-count attribute to hide the count, if selected. $type_show = variable_get_value('easy_social_twitter_count_show'); if (!$type_show) $type = 'none'; $account_via = variable_get_value('easy_social_twitter_account_via'); $account_related = variable_get_value('easy_social_twitter_account_related'); $account_related_description = variable_get_value('easy_social_twitter_account_description'); $markup = <<