$description =
$xpath->
query('//plugin/description'
);
if ($description instanceof DOMNodeList
) { $description = self::
parseTranslatableNodeList($description);
if ($description) { $info['description'
] =
$description;
} } $simpleFields =
['version', 'license', 'author', 'copyright', 'link'
];
foreach ($simpleFields as $simpleField) { $fieldValue = self::
getElementChildValueByName($pluginData,
$simpleField);
if ($fieldValue !== null
) { $info[$simpleField] =
$fieldValue;
} } foreach ($pluginData->
getElementsByTagName('changelog'
) as $changelog) { $version =
$changelog->
getAttribute('version'
);
foreach ($changelog->
getElementsByTagName('changes'
) as $changes) { $lang =
$changes->
getAttribute('lang'
) ?: 'en';
$info['changelog'
][$version][$lang][] =
$changes->nodeValue;
}