-
Notifications
You must be signed in to change notification settings - Fork 0
Home
GetSimpleCMS-CE edited this page Jan 4, 2025
·
1 revision
Makes GS page date field fixed (and editable), and adds new replacement lastUpdate field.
Helper functions / template tags:
- get_page_lastupdate($dateformat)
- return_page_lastupdate($dateformat) (they work exactly like GetSimple's get_page_date() and return_page_date() when this plugin is not installed)
A new editable Publication Date field is displayed in page options. Note that right now this editor is rudimentary (no date picker) and has no error checking. If the date/time entered is invalid, is will be saved as the current datetime ("now").
You can define the date[time] editing format by changing the GSEDITDATEFORMAT constant in the plugin. Valid format examples : 'Y-m-d H:i' => 2011-12-31 01:01 'Y-m-d' => 2011-12-31 etc... (change the "-" for a "/", "." or another symbol -or none- if you wish)
Example 1:
<?php get_page_lastupdate('Y-m-d'); ?>
Example 2:
<?php get_page_lastupdate('F jS, Y - g:i A'); ?>