Exemplo n.º 1
0
 /**
  * Return additional head tags in a concatenated string
  * @since Version 3.8 
  * @return string
  */
 public function getHeadTags()
 {
     $tags = array();
     if (count($this->rp_meta_tags)) {
         foreach ($this->rp_meta_tags as $property => $content) {
             $tag = '<meta property="' . $property . '" content="' . htmlentities(ContentUtility::formatText($content, ["strip_formatting" => true])) . '">';
             if ($property == "og:image" || $property == "twitter:image") {
                 $tag = str_replace("&amp;", "&", $tag);
             }
             $tags[] = $tag;
         }
     }
     if (count($this->head_links)) {
         foreach ($this->head_links as $rel => $href) {
             $tag = '<link rel="' . $rel . '" href="' . htmlentities($href) . '">';
             $tags[] = $tag;
         }
     }
     if (count($this->preload['prefetch'])) {
         foreach ($this->preload['prefetch'] as $href) {
             $tag = '<link rel="prefetch" href="' . htmlentities($href) . '">';
             $tags[] = $tag;
         }
     }
     if (count($this->preload['prerender'])) {
         foreach ($this->preload['prerender'] as $href) {
             $tag = '<link rel="prerender" href="' . htmlentities($href) . '">';
             $tags[] = $tag;
         }
     }
     return implode("\n\t", array_merge($tags, $this->head_tags));
 }