function advagg_insert_into_array_at_location in Advanced CSS/JS Aggregation 7.2
Insert element into an array at a specific position.
Parameters
array $input_array: The original array.
array $new_value: The element that is getting inserted.
int $location_key: The key location.
Return value
array The new array with the element merged in.
1 call to advagg_insert_into_array_at_location()
- advagg_mod_element_info_alter in advagg_mod/
advagg_mod.module - Implements hook_element_info_alter().
File
- ./
advagg.module, line 6125 - Advanced CSS/JS aggregation module.
Code
function advagg_insert_into_array_at_location(array $input_array, array $new_value, $location_key) {
return array_merge(array_slice($input_array, 0, $location_key), $new_value, array_slice($input_array, $location_key));
}