Make WordPress Core

Opened 13 years ago

Closed 11 years ago

Last modified 10 years ago

#26284 closed enhancement (fixed)

Stop get_page_uri requiring a page ID

Reported by: pollett Owned by: chriscct7
Priority: normal Milestone: 4.6
Component: Posts, Post Types Version: 3.7
Severity: trivial Keywords: has-patch has-unit-tests
Cc: Focuses: template

Description

Currently get_page_uri has to be passed a page id which is passed to get_post.

get_post is happy to work on the current page without requiring an id to be specified, removing this requirement.

Attachments (3)

getpageuri.diff​ (558 bytes ) - added by pollett 13 years ago.
26284.diff​ (1.5 KB ) - added by ericlewis 11 years ago.
26284.2.diff​ (1.4 KB ) - added by ericlewis 11 years ago.

Download all attachments as: .zip

Change History (11)

#1 @SergeyBiryukov
13 years ago

  • Version trunk → 3.7

#2 @nacin
13 years ago

  • Component General → Post Types

#3 @ericlewis
13 years ago

  • Focuses template added

Totally.

#4 @chriscct7
11 years ago

  • Milestone Awaiting Review → Future Release
  • Owner set to chriscct7
  • Status new → assigned

#5 @ericlewis
11 years ago

  • Keywords has-unit-tests added
  • Milestone Future Release → 4.6

#6 @ericlewis
11 years ago

  • Resolution → fixed
  • Status assigned → closed

In 37345:

Posts: Allow get_page_uri() to be called without a $page argument.

get_page_uri() can now be called without an argument, which will return the page URI for the current post in the loop.

Props pollett.
Fixes #26284.

#7 @SergeyBiryukov
10 years ago

In 38143:

Unit Tests: Move get_page_uri() tests to post/getPageUri.php, added in [37345].

See #26284.

#8 @SergeyBiryukov
10 years ago

In 38144:

Unit Tests: Add a @ticket reference for test_get_page_uri_without_argument().

See #26284.

Note: See TracTickets for help on using tickets.