1.20.x file.module file_is_page($file)

Returns whether the current page is the full page view of the passed-in file.

Parameters

$file: A file object.

File

modules/file/file.module, line 895
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_is_page($file) {
  $page_file = menu_get_object('file', 1);
  return (!empty($page_file) ? $page_file->fid == $file->fid : FALSE);
}