function fb_social_like_nodeapi in Facebook social plugins integration 6
Implementation of hook_nodeapi().
File
- modules/
fb_social_like/ fb_social_like.module, line 76
Code
function fb_social_like_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
case 'view':
if ($node->status && fb_social_like_type($node->type) && variable_get('fb_social_like_location', 0)) {
if ($a4 || !$a3 || variable_get('fb_social_like_display_teasers', 1) && $a3) {
$output = theme('fb_social_like_widget', fb_social_url('node/' . $node->nid));
$weight = module_exists('content') ? content_extra_field_weight($node->type, 'fb_social_like_widget') : -10;
$node->content['fb_social_like_widget'] = array(
'#weight' => $weight,
'#value' => $output,
);
}
}
break;
}
}