You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I pulled down the d7 module to find where AddThisWidgetJsURL.php is being used. AddThisWidgetJSURL is being used on line 101 in AddThisScriptManager.php
as part of the attachJsToElement function.
public function attachJsToElement(&$element) {
if ($this->addthis->getWidgetJsInclude() != AddThis::WIDGET_JS_INCLUDE_NONE) {
$widget_js = new AddThisWidgetJsUrl($this->getWidgetJsUrl());
...
There are three public function defined in AddThisWidgetJsUrl.php: removeAttribute, getFullUrl, and addAttribute. The removeAttribute function and getFullUrl functions don't appear to be used.
The addAttribute function is used three times in AddThisScriptManager.php.
If the only function that is being called for AddThisWidgetJsUrl is addAttribute, and all addAttribute does is add an attribute to the query string, I think one of these core d8 classes can be used to replace it.
D8 provides a robust URL class as part of core. Look at replacing AddThisWidgetJsURL.php class with the core URL class.
The text was updated successfully, but these errors were encountered: