You are here

function prebid_libraries_info in Doubleclick for Publishers (DFP) 7.2

Implements hook_libraries_info().

File

prebid/prebid.module, line 14

Code

function prebid_libraries_info() {
  $url_text = t('Prebid @version Publisher API Changes', array(
    '@version' => PREBID_VERSION_DOCS,
  ));
  $url_api_path = 'http://prebid.org/dev-docs/prebid-' . PREBID_VERSION_DOCS . '-API.html';
  $libraries['prebidjs'] = array(
    'name' => 'Prebid.js',
    'vendor url' => 'http://prebid.org',
    'download url' => 'http://prebid.org/download.html',
    'git url' => 'https://github.com/prebid/Prebid.js.git',
    'version arguments' => array(
      'file' => PREBID_JS_FILE,
      'pattern' => '/v(\\d.+)/',
      'lines' => 1,
    ),
    'error message' => t('Prebid JS library must be installed and at minimum version @version. To download see the !download. For API documentation see !url', array(
      '@version' => PREBID_VERSION,
      '!download' => l(t('download page'), 'http://prebid.org/download.html'),
      '!url' => l($url_text, $url_api_path),
    )),
    'files' => array(
      'js' => array(
        PREBID_JS_FILE => array(
          'type' => 'file',
          'group' => JS_DEFAULT,
          'every_page' => TRUE,
          'weight' => -5,
          'force header' => TRUE,
        ),
      ),
    ),
  );
  return $libraries;
}