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
It's not about untranslated strings in Ubercart. I've been dealing with this problem for a month and as far I suppose, the problem is that these settings, which are made in admin/...
Multisite for multilingual website
I'm not able to reproduce on a clean install of Backdrop, and a view that displays nodes. The Configure View link is not shown to anonymous.
Errant "configure view" link is visible to anonymous users
Can you post an image showing this?
Errant "configure view" link is visible to anonymous users