function theme_node_recent_content

Returns HTML for a recent node to be displayed in the recent content block.

Parameters

$variables: An associative array containing:

  • node: A node entity.

Related topics

1 theme call to theme_node_recent_content()
theme_node_recent_block in drupal/core/modules/node/node.module
Returns HTML for a list of recent content.

File

drupal/core/modules/node/node.module, line 1933
The core module that allows content to be submitted to the site.

Code

function theme_node_recent_content($variables) {
  $node = $variables['node'];
  $output = '<div class="node-title">';
  $output .= l($node
    ->label(), 'node/' . $node->nid);
  $mark = array(
    '#theme' => 'mark',
    '#mark_type' => node_mark($node->nid, $node->changed),
  );
  $output .= drupal_render($mark);
  $output .= '</div><div class="node-author">';
  $username = array(
    '#theme' => 'username',
    '#account' => user_load($node->uid),
  );
  $output .= drupal_render($username);
  $output .= '</div>';
  return $output;
}