You are here

public function OpenGraphMeta::load_node_data in Open Graph meta tags 7

Same name and namespace in other branches
  1. 6 opengraph_meta.common.inc \OpenGraphMeta::load_node_data()

Load FB meta tag data for the given node.

Return value

array('title' => ..., 'summary' => ...)

File

./opengraph_meta.common.inc, line 230

Class

OpenGraphMeta

Code

public function load_node_data($node) {
  $fields = $this
    ->get_og_tag_defaults();
  $row = $this->data_obj
    ->load_tags($node->nid);
  if (FALSE !== $row) {
    foreach ($fields as $field => &$val) {
      if (isset($row->{$field})) {
        $val = $row->{$field};
      }
    }
  }
  return $fields;
}