WordPress.org

Make WordPress Core

Ticket #24491: 24491.patch

File 24491.patch, 663 bytes (added by Viper007Bond, 5 years ago)
  • wp-includes/post.php

     
    35543554 * @since 1.5.0
    35553555 *
    35563556 * @param mixed $page Page object or page ID.
    3557  * @return string Page URI.
     3557 * @return string|false Page URI, false on error.
    35583558 */
    35593559function get_page_uri($page) {
    35603560        $page = get_post( $page );
    35613561
     3562        if ( ! $page )
     3563                return false;
     3564
    35623565        $uri = $page->post_name;
    35633566
    35643567        foreach ( $page->ancestors as $parent ) {
    3565                 $uri = get_post( $parent )->post_name . "/" . $uri;
     3568                $uri = get_post( $parent )->post_name . '/' . $uri;
    35663569        }
    35673570
    35683571        return $uri;