Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3801 closed defect (bug) (fixed)

wp_title function missing day in archives by day and unwanted $sep when month empty

Reported by: phku's profile phKU Owned by: ryan's profile ryan
Milestone: 2.2 Priority: normal
Severity: normal Version: 2.1
Component: Template Keywords: has-patch
Focuses: Cc:

Description

File: "general-template.php", line 193-214, wp_title function:

  1. should add the day in archives by day mode.
  2. shouldn't add a trailing $sep when $my_month is empty (new 2.1 archives by year option).

Suggested change:

#193 $title = "$my_year $sep $my_month";

to

#193 $my_day = intval(substr($m, 6, 2));
#194 $title = "$my_year" . ($my_month ? "$sep $my_month" : "") . 
     ($my_day ? "$sep $my_day" : "");

(searched for "archives" + "day", "archives" + "space", "wp_title")

Attachments (1)

3801.diff (539 bytes) - added by Nazgul 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @ryan
15 years ago

  • Owner changed from anonymous to ryan

@Nazgul
15 years ago

#2 @Nazgul
15 years ago

  • Keywords has-patch added

Patch based on given code snippet added.

#3 @ryan
15 years ago

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

(In [5106]) Fix day display in title. Props phKU. fixes #3801

#4 @ryan
15 years ago

  • Milestone changed from 2.1.3 to 2.2
Note: See TracTickets for help on using tickets.