You are here

function panelizer_edit_node_callback in Panelizer 7

Same name and namespace in other branches
  1. 6 panelizer.module \panelizer_edit_node_callback()

Determine if the current user has access to edit panelizer info on a node.

1 string reference to 'panelizer_edit_node_callback'
panelizer_menu in ./panelizer.module
Implements hook_menu().

File

./panelizer.module, line 208
panelize.module

Code

function panelizer_edit_node_callback($node, $check_for_default = TRUE) {
  if (!panelizer_is_panelized('node', $node->type)) {
    return FALSE;
  }

  // If there isn't a default, check to see if this node is panelized.
  if ($check_for_default && !panelizer_has_default('node', $node->type)) {
    ctools_include('node', 'panelizer');
    if (!panelizer_load_node_panelizer($node)) {
      return FALSE;
    }
  }
  return node_access('update', $node);
}