#kirby #php
<?php
return function ($page, $pages, $kirby, $site) {
/**
* Don't show old applications
*/
if ( $page->dateFrom()->toDate() > time() || $page->dateTo()->toDate() < time()) {
Header::notfound(true);
echo $site->errorPage()->render();
exit;
}
return $form;
};