WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/03/2010 08:10:26 PM (11 years ago)
Author:
nacin
Message:

Handle page hierarchy when showing the sample permalink. props duck_, fixes #12327.

File:
1 edited

Legend:

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

    r14310 r14399  
    29092909 * @since 1.5.0
    29102910 *
    2911  * @param int $page_id Page ID.
     2911 * @param mixed $page Page object or page ID.
    29122912 * @return string Page URI.
    29132913 */
    2914 function get_page_uri($page_id) {
    2915     $page = get_page($page_id);
     2914function get_page_uri($page) {
     2915    if ( ! is_object($page) )
     2916        $page = get_page($page);
    29162917    $uri = $page->post_name;
    29172918
Note: See TracChangeset for help on using the changeset viewer.