lib/traits/elements.php
protected function setOgTags()
    {
        if ($this->arResult['OG_TAGS']['TITLE'])
        {
            Asset::getInstance()->addString('<meta property="og:title" content="'.$this->arResult['OG_TAGS']['TITLE'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['DESCRIPTION'])
        {
            Asset::getInstance()->addString('<meta property="og:description" content="'.$this->arResult['OG_TAGS']['DESCRIPTION'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['URL'])
        {
            Asset::getInstance()->addString('<meta property="og:url" content="'.$this->arResult['OG_TAGS']['URL'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['IMAGE'])
        {
            Asset::getInstance()->addString('<meta property="og:image" content="'.$this->arResult['OG_TAGS']['IMAGE'].'" />', true);
        }
    }
protected function setOgTags()
    {
        if ($this->arResult['OG_TAGS']['TITLE'])
        {
            Asset::getInstance()->addString('<meta property="og:title" content="'.$this->arResult['OG_TAGS']['TITLE'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['DESCRIPTION'])
        {
            Asset::getInstance()->addString('<meta property="og:description" content="'.$this->arResult['OG_TAGS']['DESCRIPTION'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['URL'])
        {
            Asset::getInstance()->addString('<meta property="og:url" content="'.$this->arResult['OG_TAGS']['URL'].'" />', true);
        }

        if ($this->arResult['OG_TAGS']['IMAGE'])
        {
            Asset::getInstance()->addString('<meta property="og:image" content="'.$this->arResult['OG_TAGS']['IMAGE'].'" />', true);
        }
    }
protected function setOgTags ( ) { if ( $ this -> arResult [ 'OG_TAGS' ] [ 'TITLE' ] ) { Asset :: getInstance ( ) -> addString ( '<meta property="og:title" content="' . $ this -> arResult [ 'OG_TAGS' ] [ 'TITLE' ] . '" />' , true ) ; } if ( $ this -> arResult [ 'OG_TAGS' ] [ 'DESCRIPTION' ] ) { Asset :: getInstance ( ) -> addString ( '<meta property="og:description" content="' . $ this -> arResult [ 'OG_TAGS' ] [ 'DESCRIPTION' ] . '" />' , true ) ; } if ( $ this -> arResult [ 'OG_TAGS' ] [ 'URL' ] ) { Asset :: getInstance ( ) -> addString ( '<meta property="og:url" content="' . $ this -> arResult [ 'OG_TAGS' ] [ 'URL' ] . '" />' , true ) ; } if ( $ this -> arResult [ 'OG_TAGS' ] [ 'IMAGE' ] ) { Asset :: getInstance ( ) -> addString ( '<meta property="og:image" content="' . $ this -> arResult [ 'OG_TAGS' ] [ 'IMAGE' ] . '" />' , true ) ; } }
Setting open graph tags for current page

<ul> Uses:
<li> og:title
<li> og:url
<li> og:image
</ul>

@uses arResult['OG_TAGS']
Setting open graph tags for current page