GetSimple Support Forum

Full Version: Creation Date
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
GetSimple does not save a page’s creation date.

This annoyed me quite a lot when I was writing the sorting part of my menu. Apparently others have noticed the lack of it too, as FredK was asking for it. (Yes, the word others is defined as one person, I couldn’t find any other posters stating they miss it.) Chris once said “he couldn’t see a use for it” so I’m not expecting it to show up in the core.

That’s why I created this little plugin.

Just drop it in your plugin folder and forget about it until you are in need of it. If you want to display the date on your pages you can use the following function in your template:
Code:
get_page_creation_date()
The code for this function is blatantly ripped off of the core’s get_page_date(). This means that, just as with that function, you can pass any format string to it to display the time in a different way—following the PHP date() spec.

As always, I offer no guarantees. My server does not seem to throw any errors in debugging mode and I’ve tested it with the current stable build (2.01) only.

Enjoy.

(Also, this is my 300th post. A great one, isn’t it?)
That it is - congrats.

The plugin - perfect for my needs, and works just as advertised. Thanks a lot! Dank je wel! Stort tack! Muchas gracias! eh- you can tell it's Friday, yeah? Big Grin
Fridays rock!
Let me know whether you come across any problems with the plugin.
No problem! Geen probleem! Inga fara! … and I don’t speak Spanish, sorry for that :p
"No hay problema!" :-)

Thank you for this plugin. I was going to be one of "others" asking for something like this, as soon as I got registered. ;-)