function _revisioning_node_info_msg in Revisioning 6.3
Same name and namespace in other branches
- 8 revisioning_api.inc \_revisioning_node_info_msg()
- 6.4 revisioning_api.inc \_revisioning_node_info_msg()
- 7 revisioning_api.inc \_revisioning_node_info_msg()
Return a string with details about the node that is about to be displayed.
Called from revisioning_nodeapi().
Parameters
$node: The node that is about to be viewed
Return value
A translatable message containing details about the node
1 call to _revisioning_node_info_msg()
- revisioning_nodeapi in ./
revisioning.module - Implementation of hook_nodeapi().
File
- ./
revisioning_api.inc, line 521 - API functions of Revisioning module
Code
function _revisioning_node_info_msg($node) {
// Get username for the revision, not the creator of the node
$revision_author = user_load($node->revision_uid);
$placeholder_data = array(
'@content_type' => $node->type,
'%title' => $node->title,
'!author' => theme('username', $revision_author),
'@date' => format_date($node->revision_timestamp, 'small'),
);
$revision_type = _revisioning_revision_is($node);
switch ($revision_type) {
case REVISION_PENDING:
return t('Displaying <em>pending</em> revision of @content_type %title, last modified by !author on @date', $placeholder_data);
case REVISION_CURRENT:
return t('Displaying <em>current, published</em> revision of @content_type %title, last modified by !author on @date', $placeholder_data);
case REVISION_ARCHIVED:
return t('Displaying <em>archived</em> revision of @content_type %title, last modified by !author on @date', $placeholder_data);
}
}