Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#2374 closed enhancement (fixed)

Create a the_modified_date() Template Tag

Reported by: FireMotion Owned by: westi
Milestone: 2.1 Priority: low
Severity: normal Version: 1.2
Component: Template Keywords: modified, date bg|has-patch bg|commit
Focuses: Cc:


Behaviour and parameters should be the same as the_date(), except that it should run every time (the_date() only displays the date the first time it's called).

To display the date the post/page was last modified.

This tag might not be relevant for posts, but it's relevant for pages, as they get modified more often. Furthermore, the modified date is saved in the database anyway, but the only way to retrieve it is through manual SQL, or so it seems.

Attachments (1)

2374.diff (704 bytes) - added by westi 9 years ago.
Replacement patch against current trunk

Download all attachments as: .zip

Change History (5)

#1 @westi
10 years ago

  • Keywords bg|has-patch added
  • Owner changed from anonymous to westi
  • Status changed from new to assigned

The is the_modified_time and get_the_modified_time which you could use.

Like the_time and the_date these can both take a PHP timedate format string and so you can show the date from either of the above.

e.g. the_modified_time('F jS, Y');

However adding the_modified_date and get_the_modified_date looks like a good idea and I've hacked a patch together.


#2 @westi
10 years ago

  • Keywords bg|commit added

9 years ago

Replacement patch against current trunk

#3 @westi
9 years ago

I've updated the patch to match against current trunk.

#4 @ryan
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [4134]) the_modified_date(). Props westi. fixes #2374

Note: See TracTickets for help on using tickets.