| 1 | Index: wp-includes/link-template.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/link-template.php (revision 21594) |
|---|
| 4 | +++ wp-includes/link-template.php (working copy) |
|---|
| 5 | @@ -266,12 +266,9 @@ |
|---|
| 6 | * @return string |
|---|
| 7 | */ |
|---|
| 8 | function _get_page_link( $id = false, $leavename = false, $sample = false ) { |
|---|
| 9 | - global $post, $wp_rewrite; |
|---|
| 10 | + global $wp_rewrite; |
|---|
| 11 | |
|---|
| 12 | - if ( !$id ) |
|---|
| 13 | - $id = (int) $post->ID; |
|---|
| 14 | - else |
|---|
| 15 | - $post = &get_post($id); |
|---|
| 16 | + $post = get_post( $id ); |
|---|
| 17 | |
|---|
| 18 | $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) ); |
|---|
| 19 | |
|---|