Callback for pre_render to inline all JavaScript on this page.

Paramètres

array $elements: A render array containing:

  • #items: The JavaScript items as returned by drupal_add_js() and altered by drupal_get_js().
  • #group_callback: A function to call to group #items. Following this function, #aggregate_callback is called to aggregate items within the same group into a single file.
  • #aggregate_callback: A function to call to aggregate the items within the groups arranged by the #group_callback function.

Return value

array A render array that will render to a string of JavaScript tags.

Voir aussi

drupal_get_js()

1 string reference to '_advagg_mod_pre_render_scripts'
advagg_mod_element_info_alter dans advagg_mod/advagg_mod.module
Implements hook_element_info_alter().

Fichier

advagg_mod/advagg_mod.module, line 2729

Code

function _advagg_mod_pre_render_scripts(array $elements) {
    if (advagg_mod_inline_page() || advagg_mod_inline_page_js()) {
        advagg_mod_inline_js($elements['#items']);
    }
    return $elements;
}