diff --git a/wp-includes/template-functions-post.php b/wp-includes/template-functions-post.php index 673abcd014..eaf2696152 100644 --- a/wp-includes/template-functions-post.php +++ b/wp-includes/template-functions-post.php @@ -231,10 +231,13 @@ function get_post_custom_keys() { } -function get_post_custom_values($key='') { +function get_post_custom_values( $key = '' ) { global $id, $post_meta_cache; - return $post_meta_cache[$id][$key]; + if ( empty($key) ) + return $post_meta_cache[$id]; + else + return get_post_custom(); }