Add missing registred meta headers

Use the `Formatted Date` meta header to explicitly set a page's formatted date (i.e. `$meta['date_formatted']`), and `Time` to set `$meta['time']`. Use the `Hidden` meta header to manually hide a page (the page is still accessible, but won't show up in the pages list). Note the difference between `$pageData['hidden']` and `$pageData['meta']['hidden']`.
This commit is contained in:
Daniel Rudolf 2018-07-29 12:51:28 +02:00
parent a7df4c2115
commit c7d4d25ab3
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -1278,8 +1278,11 @@ class Pico
'Description' => 'description',
'Author' => 'author',
'Date' => 'date',
'Formatted Date' => 'date_formatted',
'Time' => 'time',
'Robots' => 'robots',
'Template' => 'template'
'Template' => 'template',
'Hidden' => 'hidden'
);
$this->triggerEvent('onMetaHeaders', array(&$this->metaHeaders));
@ -1374,7 +1377,6 @@ class Pico
} else {
// guarantee array key existance
$meta = array_fill_keys($headers, '');
$meta['time'] = $meta['date_formatted'] = '';
}
return $meta;
@ -1609,7 +1611,7 @@ class Pico
'time' => &$meta['time'],
'date' => &$meta['date'],
'date_formatted' => &$meta['date_formatted'],
'hidden' => (bool) preg_match('/(?:^|\/)_/', $id),
'hidden' => (preg_match('/(?:^|\/)_/', $id) || $meta['hidden']),
'raw_content' => &$rawContent,
'meta' => &$meta
);