You are here

function addtoany_footer in AddToAny Share Buttons 6.2

Same name and namespace in other branches
  1. 5.2 addtoany.module \addtoany_footer()
  2. 6.3 addtoany.module \addtoany_footer()

Implementation of hook_footer(). Would use drupal_add_js, but external scripts are not well supported

Return value

String containing JavaScript code to initialize each drop-down menu

File

./addtoany.module, line 114
Standalone module file to handle AddToAny button integration

Code

function addtoany_footer($main = 0) {
  global $_addtoany_script;
  $javascript = "<script type=\"text/javascript\">\n" . "da2a_html_ready = true;\n" . "function da2a_init(){if(da2a_script_ready){\n" . $_addtoany_script . "}}" . "</script>";
  return $javascript;
}