Microformats Helpers

author Barnaby Walters

 Methods

Find h-cards

findHCards(array $µfs) : array
Static

Parameters

$µfs

array

Returns

array

Find h-entries

findHEntries(array $µf) : array
Static

Parameters

$µf

array

Returns

array

Inline h-card

inlineHCard(array $hcard) : string
Static

Parameters

$hcard

array

Returns

string

Normalise h-entry Dates

normaliseHEntryDates(array $items) : array
Static

Given an array of h-entries, iterate through them an try to fill in any blank published dates.

If there’s an updated date but no published date, the updated date is used for the published date. If there is neither a published or an updated date but there was one for a previous item, the datetime 1 second after the publised datetime of the previous item is applied.

Parameters

$items

array

An array of h-entry microformat array structures

Returns

array