WordPress.org

Make WordPress Core

#21721 closed defect (bug) (fixed)

Twenty Twelve: Use the_time()/get_the_date() rather than the_date()

Reported by: obenland Owned by: lancewillett
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

In the footer of post formats, a permalink is being displayed, using the_date() for the anchor text. The function will only output the date if the current post's date is different from the previous one output, though. This may leave a formatted post without a permalink.

Attachments (2)

21721.diff (3.3 KB) - added by obenland 20 months ago.
21721.2.diff (3.2 KB) - added by obenland 20 months ago.
Picks up Ocean90's suggestion

Download all attachments as: .zip

Change History (9)

obenland20 months ago

comment:1 obenland20 months ago

  • Component changed from General to Bundled Theme

comment:2 follow-up: ocean9020 months ago

Does something speaks against echo get_the_date()?

comment:3 in reply to: ↑ 2 obenland20 months ago

Replying to ocean90:

Does something speaks against echo get_the_date()?

No, not at all! I like it even more.

Last edited 20 months ago by obenland (previous) (diff)

obenland20 months ago

Picks up Ocean90's suggestion

comment:4 obenland20 months ago

  • Summary changed from Twenty Twelve: Use the_time() rather than the_date() to Twenty Twelve: Use the_time()/get_he_date() rather than the_date()

comment:5 SergeyBiryukov20 months ago

  • Summary changed from Twenty Twelve: Use the_time()/get_he_date() rather than the_date() to Twenty Twelve: Use the_time()/get_the_date() rather than the_date()

comment:6 nacin20 months ago

  • Milestone changed from Awaiting Review to 3.5

comment:7 lancewillett20 months ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In [21670]:

Twenty Twelve: use get_the_date() rather than the_date() in content templates to ensure a date is always output and a post permalink is visible to site visitors. Props obenland and ocean90, fixes #21721.

Note: See TracTickets for help on using tickets.