You are here

function _media_crop_is_file_remote in Media crop 7

Checks if file is remote.

Parameters

stdClass $file: File object.

Return value

bool TRUE if file is remote, FALSE otherwise.

1 call to _media_crop_is_file_remote()
media_crop_media_format_form_prepare_alter in ./media_crop.module
Implements hook_media_format_form_prepare_alter().

File

./media_crop.module, line 1149
Media crop primary module file.

Code

function _media_crop_is_file_remote($file) {
  $scheme = file_uri_scheme($file->uri);
  $is_remote_stream_wrapper = module_exists('remote_stream_wrapper') ? file_is_scheme_remote($scheme) : FALSE;
  $is_oembed = $scheme === 'oembed';
  return $is_remote_stream_wrapper || $is_oembed;
}