Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14015 closed enhancement (fixed)

Wrappers for get_queried_object() and get_queried_object_id()

Reported by: filosofo Owned by: filosofo
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.0
Component: Template Keywords: has-patch commit
Focuses: Cc:


I am frequently writing




We have wrappers for other WP_Query methods; these seem like obvious candidates.

Patch replaces the above with the following, respectively:




Attachments (1)

get_queried_object_wrapper.14015.diff (919 bytes) - added by filosofo 5 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 @filosofo5 years ago

  • Owner set to filosofo
  • Status changed from new to accepted

comment:2 @nacin4 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Triage to 3.1

comment:3 @filosofo4 years ago

Patch still applies cleanly.

comment:4 @ryan4 years ago

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

(In [16091]) get_queried_obecjt() and get_queried_object_id(). Props filosofo. fixes #14015

comment:5 @scribu4 years ago

(In [16114]) use get_queried_object() wrappers throughout. See #14015

Note: See TracTickets for help on using tickets.