function template_preprocess_forum_submitted
Same name in other branches
- 9 core/modules/forum/forum.module \template_preprocess_forum_submitted()
- 8.9.x core/modules/forum/forum.module \template_preprocess_forum_submitted()
- 10 core/modules/forum/forum.module \template_preprocess_forum_submitted()
- 11.x core/modules/forum/forum.module \template_preprocess_forum_submitted()
Preprocesses variables for forum-submitted.tpl.php.
The submission information will be displayed in the forum list and topic list.
Parameters
$variables: An array containing the following elements:
- topic: The topic object.
See also
theme_forum_submitted()
File
-
modules/
forum/ forum.module, line 1274
Code
function template_preprocess_forum_submitted(&$variables) {
$variables['author'] = isset($variables['topic']->uid) ? theme('username', array(
'account' => $variables['topic'],
)) : '';
$variables['time'] = isset($variables['topic']->created) ? format_interval(REQUEST_TIME - $variables['topic']->created) : '';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.