WordPress.org

Make WordPress Core

Changeset 23209


Ignore:
Timestamp:
12/27/2012 03:27:11 PM (9 years ago)
Author:
nacin
Message:

Always call get_post() in get_page_uri() to ensure we have a WP_Post object, which lazy-loads the ancestors this function requires.

Merges [23208] to the 3.5 branch.
props dd32.
fixes #22883.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/post.php

    r23207 r23209  
    35953595 */
    35963596function get_page_uri($page) {
    3597     if ( ! is_object($page) )
    3598         $page = get_post( $page );
     3597    $page = get_post( $page );
     3598
    35993599    $uri = $page->post_name;
    36003600
Note: See TracChangeset for help on using the changeset viewer.