function _parser_common_syndication_title in Feeds Atom 6
Same name and namespace in other branches
- 7 libraries/atomrdf_parser.inc \_parser_common_syndication_title()
Prepare raw data to be a title
1 call to _parser_common_syndication_title()
- atomrdf_parse in libraries/
atomrdf_parser.inc - Parse AtomRDF format - for example:
File
- libraries/
atomrdf_parser.inc, line 508 - Contains the atomrd parsing functions.
Code
function _parser_common_syndication_title($title, $body = FALSE) {
if (empty($title) && !empty($body)) {
// Explode to words and use the first 3 words.
$words = preg_split("/[\\s,]+/", strip_tags($body));
$title = $words[0] . ' ' . $words[1] . ' ' . $words[2];
}
return $title;
}