public function OpenGraphMeta::getNodeBody in Open Graph meta tags 7.2
Get contents of node body.
Parameters
$node the node object.:
Return value
empty string if no body found.
1 call to OpenGraphMeta::getNodeBody()
- OpenGraphMeta::harvestImagesFromNode in ./
opengraph_meta.common.inc - Harvest all images from the given node.
File
- ./
opengraph_meta.common.inc, line 59
Class
Code
public function getNodeBody($node) {
$body = '';
$lang = field_language('node', $node, 'body');
$lang = $lang ? $lang : LANGUAGE_NONE;
if (!empty($node->body[$lang]['0']['value'])) {
$body = $node->body[$lang]['0']['value'];
}
return $body;
}