You are here

function _fb_social_like_nodeapi_view in Facebook social plugins integration 7.2

Same name and namespace in other branches
  1. 6.2 plugins/fb_plugin/like.inc \_fb_social_like_nodeapi_view()

nodeapi_view callback for this plugin

1 string reference to '_fb_social_like_nodeapi_view'
like.inc in plugins/fb_plugin/like.inc

File

plugins/fb_plugin/like.inc, line 183

Code

function _fb_social_like_nodeapi_view($preset, &$node, $view_mode = 'full') {
  if ($node->status && fb_social_preset_node_types($preset, $node->type) && $preset->settings['plugin_location']['location']) {
    if (!empty($preset->settings['plugin_location']['node_view_modes'][$view_mode])) {
      $preset->fb_attrs['href'] = fb_social_url('node/' . $node->nid);
      $output = fb_social_preset_view($preset);
      $node->content['fb_social_' . $preset->name] = array(
        '#markup' => $output,
        '#weight' => 15,
      );
    }
  }
}