Initial commit

This commit is contained in:
2019-08-25 16:36:56 +02:00
commit bedb05c13e
29 changed files with 1539 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
use Kirby\Http\Url;
use Kirby\Toolkit\F;
Kirby::plugin('lukasbestle/qdated', [
'tags' => [
'qdated' => [
'html' => function($tag) {
$qdated = qdated();
return '<a href="mailto:' . $qdated . '">' . $qdated . '</a>';
}
]
]
]);
/**
* Returns the current qdated address
* If qdated is not available, returns null
*
* @return string
*/
function qdated() {
$path = $_SERVER['HOME'] . DS . '.qdated-current';
if(!is_file($path)) return null;
return 'dated-' . trim(F::read($path)) . '@' . Url::host();
}