WPSEO_OpenGraph::facebook_filter PHP Method

facebook_filter() public method

Filter the Facebook plugins metadata
public facebook_filter ( array $meta_tags ) : array
$meta_tags array the array to fix.
return array $meta_tags
    public function facebook_filter($meta_tags)
    {
        $meta_tags['http://ogp.me/ns#type'] = $this->type(false);
        $meta_tags['http://ogp.me/ns#title'] = $this->og_title(false);
        // Filter the locale too because the Facebook plugin locale code is not as good as ours.
        $meta_tags['http://ogp.me/ns#locale'] = $this->locale(false);
        $ogdesc = $this->description(false);
        if (!empty($ogdesc)) {
            $meta_tags['http://ogp.me/ns#description'] = $ogdesc;
        }
        return $meta_tags;
    }