function parser_simplepie_simplify_raw_item in FeedAPI 5
Same name and namespace in other branches
- 6 parser_simplepie/parser_simplepie.module \parser_simplepie_simplify_raw_item()
This function simplifies a raw feed item.
File
- parser_simplepie/
parser_simplepie.module, line 102 - Parse the incoming URL with SimplePie then provide a data structure of the feed
Code
function parser_simplepie_simplify_raw_item($raw_item) {
if ($item = array_shift($raw_item['child'])) {
foreach ($item as $k => $v) {
if (count($item[$k]) > 1) {
foreach ($item[$k] as $j => $u) {
$simple_item[$k][] = $item[$k][$j]['data'];
}
}
else {
$simple_item[$k] = $item[$k][0]['data'];
}
}
return $simple_item;
}
return $raw_item;
}