You are here

function jquery_update_get_version_options in jQuery Update 7.3

Retrieve the jQuery versions available by this module as select options.

Parameters

bool $empty: Toggle on whether or not to return an empty option, which will default to the site wide default setting.

Return value

array The available jQuery versions used to populate a select input.

2 calls to jquery_update_get_version_options()
jquery_update_form_system_theme_settings_alter in ./jquery_update.module
Implements hook_form_FORM_ID_alter().
jquery_update_settings_form in ./jquery_update.admin.inc
Admin settings menu callback.

File

./jquery_update.module, line 236
Updates Drupal to use the latest version of jQuery.

Code

function jquery_update_get_version_options($empty = TRUE) {
  $options = array_merge(array(
    '' => t('Site default (!version)', array(
      '!version' => variable_get('jquery_update_jquery_version', '1.10'),
    )),
    'default' => t('1.4 (Drupal core)'),
  ), jquery_update_get_versions());
  if (!$empty) {
    unset($options['']);
  }
  return $options;
}