You are here

function responsive_favicons_get_file in Responsive Favicons 7

Creates a file object for the requested icon path.

Parameters

string $icon: the icon filename.

Return value

object a file object.

1 string reference to 'responsive_favicons_get_file'
responsive_favicons_menu in ./responsive_favicons.module
Implements hook_menu().

File

./responsive_favicons.delivery.inc, line 18
Responsible for sending icons for common paths automatically requested by certain browsers (even though the HTML does not mention them).

Code

function responsive_favicons_get_file($file_path) {
  $uri = 'public://' . variable_get('responsive_favicons_path', 'favicons') . '/' . $file_path;
  $file = new stdClass();
  $file->uri = $uri;
  $file->filemime = file_get_mimetype($uri);
  $file->filesize = @filesize($uri);
  return $file;
}