You are here

function shareaholic_install in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

Same name and namespace in other branches
  1. 8 shareaholic.install \shareaholic_install()

Implements hook_install(). When the user installs the module, log the event

File

./shareaholic.install, line 19

Code

function shareaholic_install() {
  ShareaholicUtilities::log_event('Install_Fresh');
  ShareaholicUtilities::set_version(ShareaholicUtilities::get_version());

  // If they already accepted ToS, then get or create api key
  if (ShareaholicUtilities::has_accepted_terms_of_service()) {
    ShareaholicUtilities::get_or_create_api_key();
  }

  // Add post install flag
  variable_set('Installed_Module_Shareaholic', 'shareaholic');
}