You are here

function jalalidate_nodes_preprocess_node in PersianTools 7

Implements hook_preprocess_node().

File

jalalidate_nodes/jalalidate_nodes.module, line 8

Code

function jalalidate_nodes_preprocess_node(&$variables) {
  global $language;
  if ($language->name == 'Persian') {
    $node = $variables['node'];
    $time = $variables['created'];
    $date = jalalidate_convert($time);
    $variables['date'] = $date;
    if (variable_get('node_submitted_' . $node->type, TRUE)) {
      $variables['submitted'] = t('Submitted by !username on !datetime', array(
        '!username' => $variables['name'],
        '!datetime' => $variables['date'],
      ));
    }
  }
}