function content_access_get_per_node_settings in Content Access 7
Same name and namespace in other branches
- 8 content_access.module \content_access_get_per_node_settings()
- 5 content_access.module \content_access_get_per_node_settings()
- 6 content_access.module \content_access_get_per_node_settings()
Gets the per node settings of a node.
@note This function won't apply defaults, so if there are no other settings it will return an empty array.
3 calls to content_access_get_per_node_settings()
- content_access_node_export_alter in ./
content_access.module - Implements hook_node_export_alter().
- content_access_page in ./
content_access.admin.inc - Per node settings page.
- content_access_per_node_setting in ./
content_access.module - Returns the per node role settings. If no per node settings are available, it will return the content type settings.
File
- ./
content_access.module, line 438 - Content access module file.
Code
function content_access_get_per_node_settings($node) {
foreach (db_query("SELECT settings FROM {content_access} WHERE nid = :nid", array(
':nid' => $node->nid,
)) as $record) {
$settings = $record->settings;
if (!$settings) {
return array();
}
return unserialize($settings);
}
}