function _advagg_mod_pre_render_scripts in Advanced CSS/JS Aggregation 7.2
Callback for pre_render to inline all JavaScript on this page.
Parameters
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.
See also
1 string reference to '_advagg_mod_pre_render_scripts'
- advagg_mod_element_info_alter in advagg_mod/
advagg_mod.module - Implements hook_element_info_alter().
File
- advagg_mod/
advagg_mod.module, line 2729 - Advanced aggregation modifier module.
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;
}