function oa_core_get_summary in Open Atrium Core 7.2
Helper function to return the summary of a node or the trimmed body text
Parameters
$node:
File
- includes/
oa_core.util.inc, line 1526 - Code for Utility functions for OpenAtrium spaces
Code
function oa_core_get_summary($node) {
$body_field = field_view_field('node', $node, 'body');
$body = !empty($body_field['#items'][0]['summary']) ? $body_field['#items'][0]['summary'] : (!empty($body_field[0]['#markup']) ? oa_core_trim_text($body_field[0]['#markup'], 'node/' . $node->nid . '/view') : '');
return $body;
}