You are here

function publishcontent_tab_load in Publish Content 7

Same name and namespace in other branches
  1. 6 publishcontent.module \publishcontent_tab_load()

Decide to show the (un)publish tab or not.

File

./publishcontent.module, line 67
Add link to publish or unpublish a node, with access control based on the node type

Code

function publishcontent_tab_load($nid) {
  if (is_numeric($nid)) {
    $node = node_load($nid);
    if (variable_get('publishcontent_' . $node->type, FALSE)) {
      return $node;
    }
  }
  return FALSE;
}