You are here

function _modernizr_get_type in Modernizr 7.3

Same name and namespace in other branches
  1. 8 modernizr.module \_modernizr_get_type()

Helper function for hook_modernizr_info(). Returns a Modernizr argument's type.

File

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

Code

function _modernizr_get_type($arg) {
  $data = _modernizr_get_arg_info($arg, 'type');

  // Since community-created detects are by far the most likely unknown entry,
  // we assume that a value not found in modernizr.args.inc is a community detect.
  // Note: 'tests' does NOT need t() because it is a machine value.
  return $data ? $data : 'tests';
}