Use the global post rather than the global post ID. They don't always match, and the global post is more canonical.

see #24330


git-svn-id: https://develop.svn.wordpress.org/trunk@24336 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2013-05-23 18:16:24 +00:00
parent 4d1d6f1992
commit 5f472898e5
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ function get_the_content( $more_link_text = null, $strip_teaser = false, $id = 0
$post = get_post( $id );
// Avoid parsing again if the post is the same one parsed by setup_postdata().
// The extract() will set up $pages and $multipage.
if ( $post->ID != $GLOBALS['id'] )
if ( $post->ID != get_post()->ID )
extract( wp_parse_post_content( $post, false ) );
else
global $pages, $multipage;