Adds a linked script to the page

@param	string  $url	URL to the linked script
@param	string  $type	Type of script. Defaults to 'text/javascript'
@param 	array $attribs 	attributes
@access   public
167051
public function addScript($url, $type="text/javascript", $attribs = array()) {
		$this->_scripts[$url]['type'] = $type;
		$this->_scripts[$url]['attribs'] = $attribs;
	}
1343746
public function setFavicon($url, $rel = 'shortcut icon', $type = 'image/x-icon')
    {
        return $this->addTagToGroup('favicon', '<link rel=":rel" href=":url" type=":type" />', [
            ':url'  => e($url),
            ':rel'  => e($rel),
            ':type' => e($type),
        ]);
    }
1306851
public function setEncloser($url, $length, $type)
    {
        $attributes = array('url' => $url, 'length' => $length, 'type' => $type);
        $this->addElement('enclosure', '', $attributes);
    }
1312409
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            $link      = isset($attribs['src']) ? $attribs['src'] : false;
            $condition = isset($attribs['condition']) ? $attribs['condition'] : false;

            if(!$link)
            {
                $script = trim($content);
                $hash   = md5($script.serialize($attribs));

                if (!isset($this->_loaded[$hash]))
                {
                    JFactory::getDocument()->addScriptDeclaration($script);
                    $this->_loaded[$hash] = true;
                }
            }
            else
            {
                if($condition)
                {
                    $script = parent::_renderTag($attribs, $content);
                    JFactory::getDocument()->addCustomTag($script);
                }
                else
                {
                    unset($attribs['src']);
                    unset($attribs['condition']);

                    JFactory::getDocument()->addScript($link, 'text/javascript');
                }
            }
        }
        else return parent::_renderTag($attribs, $content);
    }
214970
protected function _addHtmlAttributes(string $html, array $attribs): string {
        $dom = new DOMDocument();
        $fragment = $dom->createDocumentFragment();
        $fragment->appendXML($html);
        $dom->appendChild($fragment);
        foreach ($attribs as $attrib => $value) {
            $dom->firstChild->setAttribute($attrib, $value);
        }
        return $dom->saveXML($dom->firstChild);
    }
1210833
public function addLink(
        $linkOrRel,
        string $href = null,
        $classes = [],
        string $title = null,
        string $type = null
    ) : self {
        $link = $linkOrRel;

        if (!$linkOrRel instanceof Link) {
            $rels    = is_array($linkOrRel) ? $linkOrRel : [$linkOrRel];
            $classes = is_array($classes) ? $classes : [$classes];
            $link    = new Link($rels, $href, $classes, $title, $type);
        }

        $this->links[] = $link;

        return $this;
    }
408909
public function addStyle($url, $options = [], $attribs = [])
    {
        // B/C
        if (!is_array($options)) {
            $options = ['version' => $options];
        }

        $options = array_merge([
            'version' => null,
        ], $options);

        $alias = $this->resolveRawAlias($url);

        $file = [
            'url' => $this->handleUri($url),
            'attribs' => array_merge($attribs, $alias['attrs'] ?? []),
            'options' => array_merge($options, $alias['options'] ?? []),
        ];

        $this->styles[$url] = $file;

        return $this;
    }
118953
public function show($value = '', $attrib = null)
    {
        // overwrite object attributes
        if (is_array($attrib)) {
            $this->attrib = array_merge($this->attrib, $attrib);
        }

        // set value attribute
        $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']);

        return parent::show();
    }
874308
public function addLink( $uri, $relation, $type = NULL ){
		$this->links[]	= array(
			'uri'		=> $uri,
			'rel'		=> $relation,
			'type'		=> $type
		);
	}
14574
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            $link      = isset($attribs['src']) ? $attribs['src'] : false;
            $condition = isset($attribs['condition']) ? $attribs['condition'] : false;

            if(!$link)
            {

                $hash  = md5($content.serialize($attribs));

                if (!isset($this->_loaded[$hash]))
                {
                    JFactory::getDocument()->addStyleDeclaration($content);
                    $this->_loaded[$hash] = true;
                }
            }
            else
            {
                if($condition)
                {
                    $style = parent::_renderTag($attribs, $content);
                    JFactory::getDocument()->addCustomTag($style);
                }
                else
                {
                    unset($attribs['src']);
                    unset($attribs['condition']);

                    JFactory::getDocument()->addStyleSheet($link, 'text/css', null, $attribs);
                }
            }
        }
        else return parent::_renderTag($attribs, $content);
    }
916040
public function addInlineScript($script, $type = 'text/javascript')
    {
        $this->parts[] = '<script type="'.$type.'">'.PHP_EOL.$script.PHP_EOL.'</script>'.PHP_EOL;

        return $this;
    }
922193
function add_js( $type, $key, $src ) {
		$heading = Product::PLUGIN_TYPE === $type ? $this->heading_plugin : str_replace( '{theme}', $this->product->get_name(), $this->heading_theme );
		$key     = esc_attr( $key );
		$heading = apply_filters( $this->product->get_key() . '_feedback_deactivate_heading', $heading );
		?>
		<script type="text/javascript" id="ti-deactivate-js">
			(function ($) {
				$(document).ready(function () {
					var auto_trigger = false;
					var target_element = 'tr[data-plugin^="<?php echo $this->product->get_slug(); ?>/"] span.deactivate a';
					<?php
					if ( 'theme' === $type ) {
						?>
					auto_trigger = true;
					if ($('a.ti-auto-anchor').length == 0) {
						$('body').append($('<a class="ti-auto-anchor" href=""></a>'));
					}
					target_element = 'a.ti-auto-anchor';
						<?php
					}
					?>

					if (auto_trigger) {
						setTimeout(function () {
							$('a.ti-auto-anchor').trigger('click');
						}, <?php echo self::AUTO_TRIGGER_DEACTIVATE_WINDOW_SECONDS * 1000; ?> );
					}
					$(document).on('thickbox:removed', function () {
						$.post(ajaxurl, {
							'action': '<?php echo $key . '_uninstall_feedback'; ?>',
							'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
							'type': '<?php echo $type; ?>',
							'key': '<?php echo $key; ?>'
						});
					});
					var href = $(target_element).attr('href');
					$('#<?php echo $key; ?>ti-deactivate-no').attr('data-ti-action', href).on('click', function (e) {
						e.preventDefault();
						e.stopPropagation();

						$('body').unbind('thickbox:removed');
						tb_remove();
						var redirect = $(this).attr('data-ti-action');
						if (redirect !== '') {
							location.href = redirect;
						}
					});

					$('#<?php echo $key; ?> ul.ti-list label, #<?php echo $key; ?> ul.ti-list input[name="ti-deactivate-option"]').on('click', function (e) {
						$('#<?php echo $key; ?>ti-deactivate-yes').val($('#<?php echo $key; ?>ti-deactivate-yes').attr('data-after-text'));

						var radio = $(this).prop('tagName') === 'LABEL' ? $(this).parent() : $(this);
						if (radio.parent().find('textarea').length > 0 && radio.parent().find('textarea').val().length === 0) {
							$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
							radio.parent().find('textarea').on('keyup', function (ee) {
								if ($(this).val().length === 0) {
									$('#<?php echo $key; ?>ti-deactivate-yes').attr('disabled', 'disabled');
								} else {
									$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
								}
							});
						} else {
							$('#<?php echo $key; ?>ti-deactivate-yes').removeAttr('disabled');
						}
					});
					$("#<?php echo $key; ?>-info-disclosure").on('click', function () {
						$("#TB_window").toggleClass("<?php echo $key; ?>-container-disc-open");
						return false;
					});
					$('#<?php echo $key; ?>ti-deactivate-yes').attr('data-ti-action', href).on('click', function (e) {
						e.preventDefault();
						e.stopPropagation();
						$.post(ajaxurl, {
							'action': '<?php echo $key . '_uninstall_feedback'; ?>',
							'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
							'id': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().attr('ti-option-id'),
							'msg': $('#<?php echo $key; ?> input[name="ti-deactivate-option"]:checked').parent().find('textarea').val(),
							'type': '<?php echo $type; ?>',
						});
						var redirect = $(this).attr('data-ti-action');
						if (redirect != '') {
							location.href = redirect;
						} else {
							$('body').unbind('thickbox:removed');
							tb_remove();
						}
					});

					$(target_element).attr('name', '<?php echo wp_kses( $heading, array( 'span' => array() ) ); ?>').attr('href', '<?php echo $src; ?>').addClass('thickbox');
					var thicbox_timer;
					$(target_element).on('click', function () {
						tiBindThickbox();
					});

					function tiBindThickbox() {
						var thicbox_timer = setTimeout(function () {
							if ($("#<?php echo esc_html( $key ); ?>").is(":visible")) {
								$("body").trigger('thickbox:iframe:loaded');
								$("#TB_window").addClass("<?php echo $key; ?>-container");
								clearTimeout(thicbox_timer);
								$('body').unbind('thickbox:removed');
							} else {
								tiBindThickbox();
							}
						}, 100);
					}
				});
			})(jQuery);
		</script>
		<?php

		do_action( $this->product->get_key() . '_uninstall_feedback_after_js' );
	}
152075
public static void link(final String name, final String type, final String url) {
        final Link link = new Link().setName(name).setType(type).setUrl(url);
        getLifecycle().updateTestCase(testResult -> testResult.getLinks().add(link));
    }
28785
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            if($this->getConfig()->escape) {
                $content = $this->getTemplate()->escape($content);
            }

            JFactory::getDocument()->setTitle($content);
        }
        else return parent::_renderTag($attribs, $content);
    }
900713
public function addJavaScript( $uri, $type = NULL, $charset = NULL )
	{
		$typeDefault	= 'text/javascript';
		if( isset( $this->metaTags["http-equiv:content-script-type"] ) )
			$typeDefault	= $this->metaTags["http-equiv:content-script-type"]['content'];
		$scriptData	= array(
			'type'		=> $type ? $type : $typeDefault,
			'charset'	=> $charset ? $charset : NULL,
			'src'		=> $uri,
		);
		$this->scripts[]	= $scriptData;
	}
732039
private function setLink($type, $title, $href)
    {
        $this->links[$type] = [
            'rel' => $type,
            'title' => $title,
            'href' => $href
        ];
    }
234926
public static function script($attr, $cont = null)
    {
        if (is_string($attr)) {
            $attr = array('src' => $attr);
        }
        if ($cont) {
            if (self::$doctype == 'xhtml')
                $cont = "\n/* <![CDATA[ */\n" . $cont . "\n/* ]]> */\n";
            else
                $cont = "\n" . $cont . "\n";
        }

        return self::tag('script', $attr + array('type' => 'text/javascript', 'nl' => true),
            $cont, array_merge(self::$common_attrib, array('src','type','charset')));
    }