You are here

function modernizr_get_filename in Modernizr 8

Same name and namespace in other branches
  1. 7.3 modernizr.module \modernizr_get_filename()

Helper function to generate the current filename of the active Modernizr library

2 calls to modernizr_get_filename()
modernizr_generate_url in ./modernizr.admin.inc
Generates new Modernizr URL for admin interface Callback for 'admin/config/development/modernizr'.
modernizr_libraries_info in ./modernizr.module
Implements hook_libraries_info().

File

./modernizr.module, line 193
Main module file for Modernizr

Code

function modernizr_get_filename() {

  // Get the full path to the library,
  $full_path = modernizr_get_path();

  // Break it up into its directories and file
  $file_parts = explode('/', $full_path);

  // Isolate the filename
  $file_name = $file_parts[count($file_parts) - 1];
  return $file_name;
}