You are here

function _revisioning_title_for_tab in Revisioning 6.3

Same name and namespace in other branches
  1. 8 revisioning.module \_revisioning_title_for_tab()
  2. 6.4 revisioning.module \_revisioning_title_for_tab()
  3. 7 revisioning.module \_revisioning_title_for_tab()

Callback for the primary View and Edit tabs.

Parameters

$node:

$edit, bool:

Return value

string

1 string reference to '_revisioning_title_for_tab'
revisioning_menu_alter in ./revisioning.module
Implementation of hook_menu_alter().

File

./revisioning.module, line 874
Allows the creation and modification of pre-published as well as live content while the current revision remains unchanged and publicly visible until the changes have been reviewed by a moderator.

Code

function _revisioning_title_for_tab($node, $edit = FALSE) {
  if ($node->num_revisions <= 1 || !$node->revision_moderation) {
    return $edit ? t('Edit') : t('View');
  }
  if (_revisioning_load_op($node, $edit ? 'edit' : 'view') == REVISIONING_LOAD_LATEST) {
    return $edit ? t('Edit latest') : t('View latest');
  }
  return $edit ? t('Edit current') : t('View current');
}