You are here

function _webform_asset_alter in Webform 6.x

Same name and namespace in other branches
  1. 8.5 includes/webform.libraries.inc \_webform_asset_alter()

Alter Webform CSS or JavaScript assets and make sure they appear last.

Parameters

array $items: An array of all CSS or JavaScript being presented on the page.

string $type: The type of asset being attached.

See also

hook_library_info_build()

2 calls to _webform_asset_alter()
webform_css_alter in includes/webform.libraries.inc
Implements hook_css_alter().
webform_js_alter in includes/webform.libraries.inc
Implements hook_js_alter().

File

includes/webform.libraries.inc, line 219
Webform libraries.

Code

function _webform_asset_alter(array &$items, $type) {
  foreach ($items as $key => &$item) {
    if (strpos($key, "webform/{$type}/") === 0) {
      $item['weight'] = 1000;
      $item['group'] = 1000;
    }
  }
}