'; for ($j = 0; $j < $count; $j++) { $hidden = $j === 0 ? '' : 'class="hidden" '; $description .= ''. ''; } $description .= ''.$count.' photos
'. ''.$in_reply_to.'
'; } } $item['description'] = array(array('data' => $description)); } if (isset($entry['properties']['category'])) { $category_csv = ''; // Categories can also contain h-cards. foreach ($entry['properties']['category'] as $category) { if ($category_csv !== '') $category_csv .= ', '; if (is_string($category)) { // Can't have commas in categories. $category_csv .= str_replace(',', '', $category); } else { $category_csv .= $this->parse_hcard($category, true); } } $item['category'] = array(array('data' => $category_csv)); } if (isset($entry['properties']['published'][0])) { $timestamp = strtotime($entry['properties']['published'][0]); $pub_date = date('F j Y g:ia', $timestamp).' GMT'; $item['pubDate'] = array(array('data' => $pub_date)); } // The title and description are set to the empty string to represent // a deleted item (which also makes it an invalid rss item). if (isset($entry['properties']['deleted'][0])) { $item['title'] = array(array('data' => '')); $item['description'] = array(array('data' => '')); } $items[] = array('child' => array('' => $item)); } } // Mimic RSS data format when storing microformats. $link = array(array('data' => $url)); $image = ''; if (!is_string($feed_author) && isset($feed_author['properties']['photo'][0])) { $image = array(array('child' => array('' => array('url' => array(array('data' => $feed_author['properties']['photo'][0])))))); } // Use the name given for the h-feed, or get the title from the html. if ($feed_title !== '') { $feed_title = array(array('data' => htmlspecialchars($feed_title))); } else if ($position = strpos($data, '