Dynamic copyright
This commit is contained in:
+1
-1
@@ -6,4 +6,4 @@ Description: codesignd ist Lukas Bestle, ein Backend-Web-Entwickler und Mitglied
|
||||
|
||||
----
|
||||
|
||||
Copyright: © 2015-2017 Lukas Bestle
|
||||
Copyright: © (copyright: 2015) Lukas Bestle
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ Description: codesignd is Lukas Bestle, a backend web developer and member of th
|
||||
|
||||
----
|
||||
|
||||
Copyright: © 2015-2017 Lukas Bestle
|
||||
Copyright: © (copyright: 2015) Lukas Bestle
|
||||
|
||||
+1
-1
Submodule site/patterns updated: 32645c0414...a42ea124cc
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* copyright Kirbytag
|
||||
*
|
||||
* Usage: (copyright: <Copyright begin year>)
|
||||
*/
|
||||
kirby()->set('tag', 'copyright', [
|
||||
'html' => function($tag) {
|
||||
$begin = $tag->attr('copyright');
|
||||
$current = date('Y');
|
||||
|
||||
if($begin === $current) {
|
||||
return $current;
|
||||
} else {
|
||||
return $begin . '–' . $current;
|
||||
}
|
||||
}
|
||||
]);
|
||||
Reference in New Issue
Block a user