diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index ac62342aa..4b91b7fde 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -139,6 +139,8 @@ function _get_page_link( $id = false ) { if ( !$id ) $id = (int) $post->ID; + else + $post = &get_post($id); $pagestruct = $wp_rewrite->get_page_permastruct();