You are here

function _modernizr_get_arg_info in Modernizr 8

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

A helper function to get the information stored in modernizr.args.inc.

Parameters

string $arg: The test machine name.

string $type (default: 'desc'): The data wanted, currently just 'desc' or 'type'.

Return value

The data in the field, or FALSE if it doesn't exist.

2 calls to _modernizr_get_arg_info()
_modernizr_get_desc in ./modernizr.module
Helper function for hook_modernizr_info(). Returns a Modernizr argument's description.
_modernizr_get_type in ./modernizr.module
Helper function for hook_modernizr_info(). Returns a Modernizr argument's type.

File

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

Code

function _modernizr_get_arg_info($arg, $type = 'desc') {
  static $loaded = FALSE;
  if (!$loaded) {
    $loaded = module_load_include('inc', 'modernizr', 'modernizr.args');
  }
  $data = _modernizr_args_return($arg);

  // This data doesnt exist.
  return $data && isset($data[$type]) ? $data[$type] : FALSE;
}