WordPress.org

Make WordPress Core

Changeset 23208


Ignore:
Timestamp:
12/27/2012 03:26:05 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.

props dd32
fixes #22883
Unit tests: [1175/tests]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r23206 r23208  
    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.