#!/usr/bin/php -q xpath('//PLUGIN/@support')[0]??false) { // support link exists, update it $xml->xpath('//PLUGIN/@support')[0] = $support; } else { // support link is missing, add it $xml->addAttribute('support', $support); } echo "Updating support link\n"; file_put_contents($plugin, $xml->saveXML()); } } } break; case 'language': // nothing defined break; } // unset pending status if ($method != 'check') @unlink("$pending/$name"); ?>