function whatsappshare_init in Whatsapp Share 7.3
Same name and namespace in other branches
- 7 whatsappshare.module \whatsappshare_init()
- 7.2 whatsappshare.module \whatsappshare_init()
Note This hook is run at the beginning of the page request.
File
- ./
whatsappshare.module, line 43 - Help to share your content on whatsapp.
Code
function whatsappshare_init() {
global $base_url;
$path = $base_url . '/' . request_path();
$current_page_title = drupal_get_title();
drupal_add_js(array(
'whatsappshare' => array(
'whatsappshare_button_text' => variable_get('whatsappshare_button_text', t('Share on whatsapp')),
'whatsappshare_button_size' => variable_get('whatsappshare_button_size', t('Small')),
'whatsappshare_sharing_text' => variable_get('whatsappshare_sharing_text', t('Your sharing text will come here.')),
'whatsappshare_sharing_location' => variable_get('whatsappshare_sharing_location', '#page-title'),
'whatsappshare_site_name' => variable_get('site_name', t('Drupal')),
'whatsappshare_page_title' => $current_page_title,
'base_path' => $path,
),
), 'setting');
drupal_add_js(drupal_get_path('module', 'whatsappshare') . '/js/whatsappshare.js');
}