Skip to content

Instantly share code, notes, and snippets.

@alxfv
Created April 30, 2013 11:17
Show Gist options
  • Save alxfv/5488092 to your computer and use it in GitHub Desktop.
Save alxfv/5488092 to your computer and use it in GitHub Desktop.
<?php
// hook_nodeapi
if ($op == 'presave') {
foreach ($node->field_reply as $key => $field) {
if (strpos($field['value'], '<!-- time:') === FALSE) {
$node->field_reply[$key]['value'] = $field['value'] . '<br /><!-- time: ' . date() . ' -->';
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment