You are here

function theme_node_expire_outdated_nodes in Node expire 6

List all currently expired nodes

1 theme call to theme_node_expire_outdated_nodes()
node_expire_outdated_nodes in ./node_expire.inc
List all currently expired nodes

File

./node_expire.inc, line 57
Non hook functions.

Code

function theme_node_expire_outdated_nodes($header, $data) {

  // No results? Everything must be current.
  if (empty($data)) {
    $rows[] = array(
      array(
        'data' => t('No content are expired!'),
        'colspan' => '5',
        'align' => 'center',
      ),
    );
  }
  else {
    foreach ($data as $node) {
      $rows[] = array(
        $node->title,
        format_date($node->changed, 'small'),
        $node->expire == 0 ? t('Never') : format_date($node->expire, 'small'),
        !empty($node->name) ? $node->name : variable_get('anonymous', 'Anonymous'),
        array(
          'data' => l(t('view'), 'node/' . $node->nid),
          'align' => 'center',
          'width' => '50px',
        ),
        array(
          'data' => l(t('edit'), 'node/' . $node->nid . '/edit'),
          'align' => 'center',
          'width' => '50px',
        ),
      );
    }
  }
  return theme('table', $header, $rows);
}