You are here

function file_is_page in File Entity (fieldable files) 7

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

Parameters

$file: A file object.

2 calls to file_is_page()
file_view in ./file_entity.file_api.inc
Generate an array for rendering the given file.
template_preprocess_file_entity in ./file_entity.module
Process variables for file_entity.tpl.php

File

./file_entity.module, line 516
Extends Drupal file entities to be fieldable and viewable.

Code

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