Skip navigation
Help

theme_aggregator_block_item

6 aggregator.module theme_aggregator_block_item($item, $feed = 0)
7 aggregator.module theme_aggregator_block_item($variables)

Format an individual feed item for display in the block.

Parameters

$item: The item to be displayed.

$feed: Not used.

Return value

The item HTML.

Related topics

1 theme call to theme_aggregator_block_item()

File

drupal/modules/aggregator/aggregator.module, line 892
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function theme_aggregator_block_item($item, $feed = 0) {
  global $user;

  $output = '';
  if ($user->uid && module_exists('blog') && user_access('create blog entries')) {
    if ($image = theme('image', 'misc/blog.png', t('blog it'), t('blog it'))) {
      $output .= '<div class="icon">' . l($image, 'node/add/blog', array('attributes' => array('title' => t('Comment on this news item in your personal blog.'), 'class' => 'blog-it'), 'query' => "iid=$item->iid", 'html' => TRUE)) . '</div>';
    }
  }

  // Display the external link to the item.
  $output .= '<a href="' . check_url($item->link) . '">' . check_plain($item->title) . "</a>\n";

  return $output;
}