This is the same as https://www.drupal.org/project/drupal/issues/1664602
> ## Problem/Motivation
> Currently there is no way to pass `#attributes` to the `drupal_add_js()` function. This is not a feature that is widely used, however, there are unique cases where the `` tag generated needs to have available an `id=""` or other unique attributes to that tag.
>
> ## Proposed resolution
> By initializing the `#attributes` key of the `$js_element` array we can easily pass specific `#attribute` elements in our `drupal_add_js()` calls, and since `theme('html_tag', array('element' => $js_element));` handles `#attributes` passed to it, all additional support is inherited. Here is an example of the new attribute code working in the case 'external' type of `drupal_add_js()` is invoked. The patch of course accounts for all cases of `'type'`:
```php
case 'external':
$js_element = $element;
// Attach custom attributes to the element.
$js_element['#attributes'] = !empty($item['attributes']) ? $item['attributes'] : array();
// Preprocessing for external JavaScript files is ignored.
if ($item['defer']) {
$js_element['#attributes']['defer'] = 'defer';
}
$js_element['#attributes']['src'] = $item['data'];
$processed[$index++] = theme('html_tag', array('element' => $js_element));
break;
```
GitHub Issue #:
5478
Recent comments
I think given the warning on the source site: At this time, if your new project can afford to require PHP 5.5+, which it should, please use PHP's native password_hash() /...
July 31, 2025
I did a very quick test and if the Display format of the webform submission value is HTML then it appears but if plain text then it doesn't, so something is included regardless of if empty when...
"Hide rewriting if empty" has no effect
Just to clarify it appears that the item: Fix Search for "On the Web" module, is about the search on backdropcms.org at https://backdropcms.org/modules
July 31, 2025