Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creation Date
#1
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?)
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#2
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
There's nothing more foolish than a man chasing his hat.
Reply
#3
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
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#4
"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. ;-)
Reply




Users browsing this thread: 1 Guest(s)