function html5_media_get_extension in HTML5 Media 7
Returns the extension provided a file object.
Parameters
object A Drupal file object.:
Return value
string The file extension.
1 call to html5_media_get_extension()
- html5_media_get_media_type in ./
html5_media.module - Return the media type provided a Drupal file object.
File
- ./
html5_media.module, line 251
Code
function html5_media_get_extension($file) {
// Get the file source.
if ($source = html5_media_get_source($file)) {
return drupal_strtolower(drupal_substr($source, strrpos($source, '.') + 1));
}
return '';
}