function _easy_social_widget_googleplus_markup in Easy Social 7.2
Generate the needed markeup for the Google+ share link.
Parameters
$url The url to be shared:
$type Generate horizontal or vertical widgets:
$title The title to be shared:
Return value
string the html markup
1 string reference to '_easy_social_widget_googleplus_markup'
- easy_social_easy_social_widget in ./
easy_social.module - Implements hook_easy_social_widget().
File
- includes/
easy_social.widgets.inc, line 96 - Easy Social default widget functions.
Code
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
<div class="g-plusone" data-size="{<span class="php-variable">$type</span>}" data-annotation="{<span class="php-variable">$annotation</span>}" data-href="{<span class="php-variable">$url</span>}"></div>
GP;
}
else {
$markup = <<<GP
<g:plusone size="{<span class="php-variable">$type</span>}" href="{<span class="php-variable">$url</span>}" annotation="{<span class="php-variable">$annotation</span>}"></g:plusone>
GP;
}
return $markup;
}