WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6638 closed defect (bug) (fixed)

Do not query default category inside get_permalink() if there is no need

Reported by: mdawaffe Owned by: mdawaffe
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch dev-feedback
Focuses: Cc:

Description

get_permalink() determines the slug of the default category even when there is no %category% placeholder in the permalink structure.

Attached moves this query up into the category conditional statement.

Attachments (1)

6638.diff (956 bytes) - added by mdawaffe 7 years ago.

Download all attachments as: .zip

Change History (4)

@mdawaffe7 years ago

comment:1 @mdawaffe7 years ago

  • Keywords has-patch dev-feedback added
  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

comment:2 @ryan7 years ago

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

(In [7626]) Move category query to get category case of get_permalink to avoid unnecessary queries. Props mdawaffe. fixes #6638 for trunk

comment:3 @ryan7 years ago

(In [7627]) Move category query to get category case of get_permalink to avoid unnecessary queries. Props mdawaffe. fixes #6638 for 2.5

Note: See TracTickets for help on using tickets.