You are here

function select2_libraries_info in Select 2 7

Implements hook_libraries_info().

For defining external libraries.

File

./select2.module, line 96
Main file for Select2 module.

Code

function select2_libraries_info() {
  global $user, $language;
  $libraries['select2'] = array(
    'name' => 'select2',
    'vendor url' => 'http://ivaynberg.github.io/select2',
    'download url' => 'https://github.com/ivaynberg/select2/tags',
    // 2.1.12
    'version arguments' => array(
      'file' => 'select2.jquery.json',
      'pattern' => '@"version": "([0-9\\.a-z\\-]+)"@',
      'lines' => 20,
      'cols' => 400,
    ),
    'files' => array(
      'js' => array(
        'select2.js',
      ),
      'css' => array(
        'select2.css',
      ),
    ),
    'variants' => array(
      'source' => array(
        'files' => array(
          'js' => array(
            'select2.js',
          ),
          'css' => array(
            'select2.css',
          ),
        ),
      ),
      'minified' => array(
        'files' => array(
          'js' => array(
            'select2.min.js',
          ),
          'css' => array(
            'select2.css',
          ),
        ),
      ),
    ),
    'versions' => array(
      '3' => array(
        'files' => array(
          'js' => array(
            'select2.js',
          ),
          'css' => array(
            'select2.css',
          ),
        ),
        'variants' => array(
          'source' => array(
            'files' => array(
              'js' => array(
                'select2.js',
              ),
              'css' => array(
                'select2.css',
              ),
            ),
          ),
          'minified' => array(
            'files' => array(
              'js' => array(
                'select2.min.js',
              ),
              'css' => array(
                'select2.css',
              ),
            ),
          ),
        ),
      ),
      '4' => array(
        'files' => array(
          'js' => array(
            'dist/js/select2.full.js',
          ),
          'css' => array(
            'dist/css/select2.css',
          ),
        ),
        'variants' => array(
          'source' => array(
            'files' => array(
              'js' => array(
                'dist/js/select2.full.js',
              ),
              'css' => array(
                'dist/css/select2.css',
              ),
            ),
          ),
          'minified' => array(
            'files' => array(
              'js' => array(
                'dist/js/select2.full.min.js',
              ),
              'css' => array(
                'dist/css/select2.min.css',
              ),
            ),
          ),
        ),
      ),
    ),
    'callbacks' => array(
      'post-load' => array(
        '_select2_post_load_library_callback',
      ),
    ),
  );
  return $libraries;
}