Make WordPress Core

Ticket #35368: 35368.diff

File 35368.diff, 462 bytes (added by swissspidy, 10 years ago)
  • src/wp-includes/post.php

    diff --git src/wp-includes/post.php src/wp-includes/post.php
    index cc8e843..72ef164 100644
    function _page_traverse_name( $page_id, &$children, &$result ){ 
    42914291 * @return string|false Page URI, false on error.
    42924292 */
    42934293function get_page_uri( $page ) {
    4294         $page = get_post( $page );
     4294        if ( ! $page instanceof WP_Post ) {
     4295                $page = get_post( $page );
     4296        }
    42954297
    42964298        if ( ! $page )
    42974299                return false;