} } } $entry = $page->hevent; } else { $notices[] = 'No h-entry or h-event was found on the page. Using the page title for the name.'; $entry = false; } if ($page->hentry && ($published = $page->hentry->published)) { $data['date'] = $published->format('U'); } else { $notices[] = 'No publish date found.'; } # If no h-entry was found, or if didn't find the title, look at the page title if ($data['title'] == false) { $pageTitle = $parser->xpath('./*/title'); if ($pageTitle->length > 0) { foreach ($pageTitle as $t) { $data['title'] = $t->textContent; } } } // Find out if the entry has a u-syndication link to IndieNews if ($entry) { $synURL = false; if ($syndications = $entry->property('syndication')) { // Find the syndication URL that matches http://news.indiewebcamp.com/ or the full URL foreach ($syndications as $syn) { if (preg_match('/^https?:\\/\\/' . Config::$hostname . '\\/?/', $syn, $match)) { $synURL = $syn; }