You are here

function sexybookmarks_sexybookmarks_content_type_render in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.2

Same name and namespace in other branches
  1. 7 plugins/content_types/sexybookmarks.inc \sexybookmarks_sexybookmarks_content_type_render()

Render callback.

File

plugins/content_types/sexybookmarks.inc, line 18

Code

function sexybookmarks_sexybookmarks_content_type_render($subtype, $conf, $args, $context) {
  if (isset($context->data) && !empty($conf['profile'])) {
    $node = clone $context->data;
    $block = new stdClass();
    $block->module = 'sexybookmarks';
    $block->delta = $node->nid;
    $block->title = t('Sexybookmarks');
    $block->content = theme('sexybookmarks', array(
      'profile' => $conf['profile'],
      'url' => url("node/{$node->nid}", array(
        'absolute' => TRUE,
      )),
      'title' => $node->title,
    ));
    return $block;
  }
  return;
}