public function display($defaults = array(), $displayTitle = false)
    {
        $metaAttributes = array_replace_recursive($defaults, $this->attributes);
        $results = array();

         // Handle other custom properties.
        foreach($metaAttributes as $name => $content) {
            if ($name === 'keywords') {
                $keywords = $this->prepareKeywords($content);
                $results[] = $this->metaTag('keywords', $keywords);
            }
            elseif ($this->isAssociativeArray($content)) {
                $results = array_merge($results, $this->processNestedAttributes($name, $content));
            }
            else {
                foreach((array)$content as $con) {
                    $results[] =  $this->metaTag($name, $con);
                }
            }
        }

        if ($displayTitle && array_key_exists('title', $metaAttributes)) {
            $results[] = $this->titleTag($metaAttributes['title']);
        }

        return implode("\n", $results);
    }
public function display($defaults = array(), $displayTitle = false)
    {
        $metaAttributes = array_replace_recursive($defaults, $this->attributes);
        $results = array();

         // Handle other custom properties.
        foreach($metaAttributes as $name => $content) {
            if ($name === 'keywords') {
                $keywords = $this->prepareKeywords($content);
                $results[] = $this->metaTag('keywords', $keywords);
            }
            elseif ($this->isAssociativeArray($content)) {
                $results = array_merge($results, $this->processNestedAttributes($name, $content));
            }
            else {
                foreach((array)$content as $con) {
                    $results[] =  $this->metaTag($name, $con);
                }
            }
        }

        if ($displayTitle && array_key_exists('title', $metaAttributes)) {
            $results[] = $this->titleTag($metaAttributes['title']);
        }

        return implode("\n", $results);
    }
public function display ( $ defaults = array ( ) , $ displayTitle = false ) { $ metaAttributes = array_replace_recursive ( $ defaults , $ this -> attributes ) ; $ results = array ( ) ; // Handle other custom properties. foreach ( $ metaAttributes as $ name => $ content ) { if ( $ name === 'keywords' ) { $ keywords = $ this -> prepareKeywords ( $ content ) ; $ results [ ] = $ this -> metaTag ( 'keywords' , $ keywords ) ; } elseif ( $ this -> isAssociativeArray ( $ content ) ) { $ results = array_merge ( $ results , $ this -> processNestedAttributes ( $ name , $ content ) ) ; } else { foreach ( ( array ) $ content as $ con ) { $ results [ ] = $ this -> metaTag ( $ name , $ con ) ; } } } if ( $ displayTitle && array_key_exists ( 'title' , $ metaAttributes ) ) { $ results [ ] = $ this -> titleTag ( $ metaAttributes [ 'title' ] ) ; } return implode ( "\n" , $ results ) ; }
Display the meta tags with the set attributes
@param string $defaults The default meta attributes
@return string The meta tags
Display the meta tags with the set attributes