You are here

function workbench_moderation_node_is_current in Workbench Moderation 7.3

Same name and namespace in other branches
  1. 7 workbench_moderation.module \workbench_moderation_node_is_current()

Utility function to determine if this node is in the live state.

Parameters

$node: The node being acted upon.

Return value

Boolean TRUE if this is the current revision. FALSE if not.

1 call to workbench_moderation_node_is_current()
workbench_moderation_rules_condition_content_is_live_revision in ./workbench_moderation.rules.inc
Condition: Check if the content is live revision

File

./workbench_moderation.module, line 1370
Content moderation for Workbench.

Code

function workbench_moderation_node_is_current($node) {
  if (isset($node->workbench_moderation['published']->vid) && isset($node->workbench_moderation['current']->vid)) {
    if ($node->workbench_moderation['published']->vid == $node->workbench_moderation['current']->vid) {
      return TRUE;
    }
    return FALSE;
  }

  // If not set, then TRUE.
  return TRUE;
}