You are here

function hijri_node_presave in Hijri 7

Same name and namespace in other branches
  1. 8 _hijri.module \hijri_node_presave()

Implements hook_node_presave().

File

./hijri.module, line 274
This module convert to Hijri date in nodes,comments and a block.

Code

function hijri_node_presave($node) {
  $node_types = variable_get('hijri_types', array());
  foreach ($node_types as $type) {
    if ($node->type == $type) {
      $node->field_hijri_correction[$node->language][0]['value'] = variable_get('hijri_correction_value', 0);
    }
  }
}