get_post(): Don't use for cache lookup when a post id is passed.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd7f914d8c
commit
97504fef96
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue