Ejemplo n.º 1
0
 /**
  * Insert the disable analytics meta tag
  */
 public static function insert_disable_analytics_meta_tag()
 {
     if (!ShareaholicUtilities::is_admin_page() && ShareaholicUtilities::has_tos_and_apikey() && ShareaholicUtilities::get_option('disable_analytics') === 'on') {
         $element = array('#type' => 'html_tag', '#tag' => 'meta', '#attributes' => array('name' => 'shareaholic:analytics', 'content' => 'disabled'));
         drupal_add_html_head($element, 'shareaholic_disable_analytics');
     }
 }
Ejemplo n.º 2
0
 /**
  * Show the pending update notice on admin pages
  *
  */
 public static function show_pending_update_notice(&$vars)
 {
     if (ShareaholicUtilities::is_admin_page() && ShareaholicUtilities::has_accepted_terms_of_service() && !db_table_exists('shareaholic_content_settings') && user_access('administer modules')) {
         $message = sprintf(t('Action required: You have pending updates required by Shareaholic. Please go to update.php for more information.'));
         $vars['page'] = self::header_message_html($message) . $vars['page'];
     }
 }
 /**
  * Inserts the script code snippet into the head of the
  * public pages of the site if they have accepted ToS and have apikey
  */
 public static function insert_script_tag()
 {
     if (!ShareaholicUtilities::is_admin_page() && ShareaholicUtilities::has_tos_and_apikey()) {
         $markup = self::js_snippet();
         $element = array('#type' => 'markup', '#markup' => $markup);
         drupal_add_html_head($element, 'shareaholic_script_tag');
     }
 }