diff --git a/wp-includes/functions.php b/wp-includes/functions.php index f06e14610e..f13d8c283d 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -553,9 +553,7 @@ function &get_post(&$post, $output = OBJECT) { $post_cache[$post->ID] = &$post; $post = & $post_cache[$post->ID]; } else { - if ( isset($GLOBALS['post']) && ($post == $GLOBALS['post']->ID) ) - $post = & $GLOBALS['post']; - elseif (isset($post_cache[$post])) + if (isset($post_cache[$post])) $post = & $post_cache[$post]; else { $query = "SELECT * FROM $wpdb->posts WHERE ID=$post";