WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#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 3 years ago.
21721.2.diff (3.2 KB) - added by obenland 3 years ago.
Picks up Ocean90's suggestion

Download all attachments as: .zip

Change History (9)

@obenland3 years ago

comment:1 @obenland3 years ago

  • Component changed from General to Bundled Theme

comment:2 follow-up: @ocean903 years ago

Does something speaks against echo get_the_date()?

comment:3 in reply to: ↑ 2 @obenland3 years ago

Replying to ocean90:

Does something speaks against echo get_the_date()?

No, not at all! I like even more.

Version 0, edited 3 years ago by obenland (next)

@obenland3 years ago

Picks up Ocean90's suggestion

comment:4 @obenland3 years 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 @SergeyBiryukov3 years 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 @nacin3 years ago

  • Milestone changed from Awaiting Review to 3.5

comment:7 @lancewillett3 years 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.