From d2b598c1c3c28eebbb60e8b8b3c5e690459edb7b Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 8 Mar 2005 16:28:57 +0000 Subject: [PATCH] Add missing globals to post_custom(). http://mosquito.wordpress.org/view.php?id=1058 Props: kellan git-svn-id: https://develop.svn.wordpress.org/trunk@2420 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/template-functions-post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index d49f3831b4..7f5221d0ae 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -234,6 +234,8 @@ function get_post_custom_values($key='') { } function post_custom( $key = '' ) { + global $id, $post_meta_cache; + if ( 1 == count($post_meta_cache[$id][$key]) ) return $post_meta_cache[$id][$key][0]; else return $post_meta_cache[$id][$key]; }