Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#13212 closed defect (bug) (fixed)

shortlink wp_get_shortlink fix

Reported by: shanef's profile ShaneF Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: shortlink has-patch commit
Focuses: Cc:

Description

If inside the loop:

echo wp_get_shortlink();

..it does not return anything. Have to add $id to the global to fix that.

Fixed in patch. :)

Attachments (2)

13212.diff (405 bytes) - added by ShaneF 15 years ago.
13212.2.diff (572 bytes) - added by ryan 15 years ago.

Download all attachments as: .zip

Change History (4)

@ShaneF
15 years ago

@ryan
15 years ago

#1 @ryan
15 years ago

Wouldn't that global stomp the $id arg. Attached an alternative patch that makes use of get_post()'s ability to fetch the current post when passed 0. Untested.

#2 @westi
15 years ago

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

(In [14490]) Make wp_get_shortlink() loop friendly. Fixes #13212 props ryan.

Note: See TracTickets for help on using tickets.