API16

API16:JDocument/getMetaData

From Joomla! Documentation

Revision as of 01:31, 25 March 2017 by JoomlaWikiBot (talk | contribs) (preparing for archive only)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Gets a meta tag.


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

Syntax

getMetaData($name, $http_equiv=false)
Parameter Name Default Value Description
$name $name Value of name or http-equiv tag
$http_equiv false $http_equiv META type "http-equiv" defaults to null

Returns

string public

Defined in

libraries/joomla/document/document.php

Importing

jimport( 'joomla.document.document' );

Source Body

function getMetaData($name, $http_equiv = false)
{
        $result = '';
        $name = strtolower($name);
        if ($name == 'generator') {
                $result = $this->getGenerator();
        } elseif ($name == 'description') {
                $result = $this->getDescription();
        } else {
                if ($http_equiv == true) {
                        $result = @$this->_metaTags['http-equiv'][$name];
                } else {
                        $result = @$this->_metaTags['standard'][$name];
                }
        }
        return $result;
}


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

Examples

Code Examples