function at_theme_conditional_script

cis7 at_theme_conditional_script($filepath)
cle7 at_theme_conditional_script($filepath)
elmsmedia7 at_theme_conditional_script($filepath)
icor7 at_theme_conditional_script($filepath)
meedjum_blog7 at_theme_conditional_script($filepath)
mooc7 at_theme_conditional_script($filepath)

Return a themed script. Since Drupal 7 does not (yet) support the 'browser' option in drupal_add_js() Adaptivetheme provides a way to load scripts inside conditional comments. This function wraps a file in script elements and returns a string.


$filepath, path to the file.:

1 call to at_theme_conditional_script()
at_load_polyfills in sites/all/themes/ulmus/adaptivetheme/at_core/inc/
Load Polyfill Scripts Conditional scripts are returned to the preprocess function - in AT Core that means adaptivetheme_preprocess_html() and adaptivetheme_preprocess_maintenance_page(). There are two sources for conditional scripts - the subtheme…


sites/all/themes/ulmus/adaptivetheme/at_core/inc/, line 564
Provides frequently used functions that load something, ususally CSS or JS files, or that provide assistance to those loaders.


function at_theme_conditional_script($filepath) {
  $script = '';

  // We need the default query string for cache control finger printing
  $query_string = variable_get('css_js_query_string', '0');

  if (file_exists($filepath)) {
    $file = file_create_url($filepath);
    $script = '<script src="' . $file . '?' . $query_string . '"></script>';

  return $script;



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.