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: http://core.svn.wordpress.org/trunk@24336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d8db743e35
commit
99dc867670
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue