API15

JDocumentHTML/addFavicon

From Joomla! Documentation

< API15:JDocumentHTML
Revision as of 19:31, 24 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Adds a shortcut icon (favicon)

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

addFavicon($href, $type= 'image/x-icon', $relation= 'shortcut icon')
Parameter Name Default Value Description
$href $href The link that is being related.
$type 'image/x-icon' $type File type
$relation 'shortcut icon' $relation Relation of link public

Defined in[edit]

libraries/joomla/document/html/html.php

Importing[edit]

jimport( 'joomla.document.html.html' );

Source Body[edit]

function addFavicon($href, $type = 'image/x-icon', $relation = 'shortcut icon')
{
        $href = str_replace( '\\', '/', $href );
        $this->_links[] = '<link href="'.$href.'" rel="'.$relation.'" type="'.$type.'"';
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

Code Examples[edit]