[ 'qdated' => [ 'html' => function($tag) { $qdated = qdated($tag->qdated); return '' . $qdated . ''; } ] ] ]); /** * Returns the current qdated address * If qdated is not available, returns null * * @param string $destination * @return string */ function qdated(string $destination) { $path = $_SERVER['HOME'] . '/.config/qdated/' . $destination . '/current'; if(!is_file($path)) return null; return 'dated-' . trim(F::read($path)) . '@' . Url::host(); }