function comment_og_admin_edit_msg in Comment OG 6
Helper function that builds the "Edited by" message when a group administrator edits a message
Parameters
user: Valid user object
author: Original comment author name
user:
Return value
Either a tokenized "Edited by" message or the default message depending on the presence of
3 calls to comment_og_admin_edit_msg()
- comment_og_form_add_preview in ./
comment_og.module - comment_og_form_submit in ./
comment_og.module - Modified version of comment_form_submit() used for editing by group administrators
- comment_og_settings in ./
comment_og.module - Implementation of hook_settings().
1 string reference to 'comment_og_admin_edit_msg'
- comment_og_settings in ./
comment_og.module - Implementation of hook_settings().
File
- ./
comment_og.module, line 393
Code
function comment_og_admin_edit_msg($user = NULL) {
$default_msg = t('[This post has been modified by @user]', array(
'@user' => '%user',
));
if ($user) {
// prepare and the message for display by replacing tokens
$date = time();
$message = check_plain(variable_get('comment_og_admin_edit_msg', $default_msg));
return $message ? theme('comment_og_edit_msg', str_replace('%user', strip_tags(theme('username', $user)), $message)) : '';
}
else {
return $default_msg;
}
}