function ws_facebook_like_data in Service links 7.2
Same name and namespace in other branches
- 6.2 services/widget_services.module \ws_facebook_like_data()
Callback function for Facebook Like.
1 string reference to 'ws_facebook_like_data'
- widget_services_service_links in services/
widget_services.module - Implements hook_service_links().
File
- services/
widget_services.module, line 121 - Extends Service Links with dynamic buttons.
Code
function ws_facebook_like_data(&$service, $subst) {
static $params;
if (!isset($params)) {
$params = array(
'layout' => check_plain(variable_get('service_links_fl_layout', 'button_count')),
'show_faces' => check_plain(variable_get('service_links_fl_show_faces', 'false')),
'share' => check_plain(variable_get('service_links_fl_share', 'false')),
'action' => check_plain(variable_get('service_links_fl_action', 'like')),
'colorscheme' => check_plain(variable_get('service_links_fl_colorscheme', 'light')),
'font' => check_plain(variable_get('service_links_fl_font', '')),
'width' => (int) variable_get('service_links_fl_width', 100),
'height' => (int) variable_get('service_links_fl_height', 21),
'locale' => check_plain(variable_get('service_links_fl_locale', '')),
);
$fl_settings = array(
'width' => $params['width'],
'height' => $params['height'],
);
drupal_add_js(array(
'ws_fl' => $fl_settings,
), 'setting');
}
$service['url'][1] = array_merge($service['url'][1], $params);
}