Although not technically a meta tag, the title tag would be a handy addition as it is an arbitraty informative label too.
With a tiny addition between the $metadata decleration the $tags as $tag loop to create a$metadata['title'] key val pair, one could add the given title too.
if($allMeta){
$title = $doc->getElementsByTagName('title');
$metadata['title'] = $title->length > 0 ? $title->item(0)->textContent : null ;
}
By putting it here, should there be a metata tag called title too, it would override this value for the preffered one.
Although not technically a meta tag, the title tag would be a handy addition as it is an arbitraty informative label too.
With a tiny addition between the
$metadatadecleration the$tags as $tagloop to create a$metadata['title']key val pair, one could add the given title too.By putting it here, should there be a metata tag called
titletoo, it would override this value for the preffered one.