WordPress.org

Make WordPress Core


Ignore:
Timestamp:
12/26/2015 03:45:28 AM (4 years ago)
Author:
dd32
Message:

Pages: get_page_uri() should return the URI at which the resource being accessed is available at, this may include non-'publish' status posts.

Reverts [34001] and fixes the original issue in #15963 - avoiding a PHP Notice for when the post doesn't exist.

Props tharsheblows.
See #15963.
Fixes #35084.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post.php

    r35987 r36094  
    675675        $this->assertEquals( 'parent/child', get_page_uri( $child_id ) );
    676676
    677         // now delete the parent and check
    678         wp_delete_post( $parent_id );
     677        // now delete the parent from the database and check
     678        wp_delete_post( $parent_id, true );
    679679        $this->assertEquals( 'child', get_page_uri( $child_id ) );
    680680    }
Note: See TracChangeset for help on using the changeset viewer.