Make WordPress Core

Changeset 21596


Ignore:
Timestamp:
08/23/2012 07:28:58 PM (12 years ago)
Author:
ryan
Message:

Don't overwrite the post global in _get_page_link(). see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/link-template.php

    r21571 r21596  
    267267 */
    268268function _get_page_link( $id = false, $leavename = false, $sample = false ) {
    269     global $post, $wp_rewrite;
    270 
    271     if ( !$id )
    272         $id = (int) $post->ID;
    273     else
    274         $post = &get_post($id);
     269    global $wp_rewrite;
     270
     271    $post = get_post( $id );
    275272
    276273    $draft_or_pending = in_array( $post->post_status, array( 'draft', 'pending', 'auto-draft' ) );
Note: See TracChangeset for help on using the changeset viewer.