You are here

function media_gallery_multiedit_access in Media Gallery 7.2

Same name and namespace in other branches
  1. 7 media_gallery.module \media_gallery_multiedit_access()

Access callback for editing parts of a node that are only relevant for media galleries.

1 string reference to 'media_gallery_multiedit_access'
media_gallery_menu in ./media_gallery.module
Implements hook_menu().

File

./media_gallery.module, line 1512

Code

function media_gallery_multiedit_access($node) {
  if (!media_gallery_edit_access($node)) {
    return;
  }
  $media_items = field_get_items('node', $node, 'media_gallery_file');
  if ($media_items === FALSE) {
    return;
  }
  $media_items = media_gallery_filter_media_access($media_items, 'update');
  if (count($media_items) > 0) {
    return TRUE;
  }
}