You are here

function fb_social_link in Facebook social plugins integration 7.2

Same name and namespace in other branches
  1. 6.2 fb_social.module \fb_social_link()

Fake hook_link (as in D6); for easy maintanance only

1 call to fb_social_link()
fb_social_node_view in ./fb_social.module
Implements hook_node_view().

File

./fb_social.module, line 192

Code

function fb_social_link($type, $object = NULL, $view_mode = 'full') {
  $links = array();
  if ($presets = fb_social_get_presets()) {
    foreach ($presets as $preset) {

      // let plugins say something
      $plugin = fb_social_fb_plugin_load($preset->plugin_type);
      $function = ctools_plugin_get_function($plugin, 'hook_link');
      if ($function) {
        $links += $function($preset, $type, $object, $view_mode);
      }
    }
  }
  if (isset($links)) {
    return $links;
  }
}