function html5_tools_preprocess_comment in HTML5 Tools 7
Implements hook_preprocess_comment().
File
- ./
html5_tools.module, line 178
Code
function html5_tools_preprocess_comment(&$variables) {
if (variable_get('html5_tools_override_submitted', 0)) {
$comment = $variables['elements']['#comment'];
// Override the $submitted variable.
$variables['submitted'] = t('Submitted by !username on !datetime', array(
'!username' => $variables['author'],
'!datetime' => theme('html5_tools_time', array(
'date' => $variables['created'],
'isodate' => format_date($comment->created, 'html5_tools_iso8601'),
)),
));
// Also override the $created variable because Bartik uses it instead of $submitted.
$variables['created'] = theme('html5_tools_time', array(
'date' => $variables['created'],
'isodate' => format_date($comment->created, 'html5_tools_iso8601'),
));
}
}