Skip to content

Instantly share code, notes, and snippets.

@lawebfabric
Last active December 1, 2018 15:30
Show Gist options
  • Save lawebfabric/cd30dde21fbe838dbf4fea5b2b855362 to your computer and use it in GitHub Desktop.
Save lawebfabric/cd30dde21fbe838dbf4fea5b2b855362 to your computer and use it in GitHub Desktop.
Copyright Year Snippet for MODX Revolution
<?php
//-----------------------------------------------------------
// copyrightYear
//-----------------------------------------------------------
/*
* @author: Steeve from lawebfabric
* @website: http://www.lawebfabric.com
* @tutorial modx website: http://www.tutocms.fr/
*/
// Usage : [[copyrightYear? &since=`2010`]] or with only the current year [[copyrightYear]]
// Param since : the year you create the website
$year = date('Y');
$since = isset($scriptProperties['since']) ? $since : $year;
$output = ($year > $since) ? $since.' - '.$year : $year;
return $output;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment