You are here

function addtoany_link in AddToAny Share Buttons 5.2

Same name and namespace in other branches
  1. 5 addtoany.module \addtoany_link()
  2. 6.3 addtoany.module \addtoany_link()
  3. 6 addtoany.module \addtoany_link()
  4. 6.2 addtoany.module \addtoany_link()

Implementation of hook_link().

File

./addtoany.module, line 19
Stand alone module file to handle AddToAny button integration

Code

function addtoany_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();
  if ($type === 'node') {
    if ($teaser && variable_get('addtoany_display_in_teasers', '0') || !$teaser && variable_get('addtoany_display_in_links', '0')) {
      $links['addtoany'] = array(
        'title' => _addtoany_create_button($node, $teaser),
        'html' => TRUE,
      );
    }
  }
  return $links;
}