function text_noderef_access in Text or Nodereference 7
Same name and namespace in other branches
- 6 text_noderef.module \text_noderef_access()
Check access to the menu callback of the text_noderef widget.
Parameters
$bundle_name: Bundle name.
$field_name: Field name.
1 string reference to 'text_noderef_access'
- text_noderef_menu in ./
text_noderef.module - Implements hook_menu().
File
- ./
text_noderef.module, line 31 - Text or nodereference field formatter for a text field and autocomplete widget.
Code
function text_noderef_access($bundle_name, $field_name) {
return user_access('access content') && ($field = field_info_instance('node', $field_name, $bundle_name)) && field_access('view', $field, 'node') && field_access('edit', $field, 'node');
}