function panelizer_edit_node_callback in Panelizer 6
Same name and namespace in other branches
- 7 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 - Implementation of hook_menu().
File
- ./
panelizer.module, line 207 - panelizer.module
Code
function panelizer_edit_node_callback($node, $check_for_default = TRUE) {
if (!user_access('use panelizer') || !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);
}