You are here

function _parser_simplepie_title in FeedAPI 6

Same name and namespace in other branches
  1. 5 parser_simplepie/parser_simplepie.module \_parser_simplepie_title()

Prepare raw data to be a title

1 call to _parser_simplepie_title()
_parser_simplepie_feedapi_parse in parser_simplepie/parser_simplepie.module
Parsing the feed

File

parser_simplepie/parser_simplepie.module, line 241
Parse the incoming URL with SimplePie then provide a data structure of the feed

Code

function _parser_simplepie_title($title, $body = FALSE) {
  if (empty($title) && !empty($body)) {

    // Explode to words and use the first 3 words.
    $words = preg_split("/[\\s,]+/", $body);
    $title = $words[0] . ' ' . $words[1] . ' ' . $words[2];
  }
  return $title;
}