Ticket #2160: 2160.diff
File 2160.diff, 843 bytes (added by , 18 years ago) |
---|
-
wp-includes/template-functions-post.php
198 198 if ( isset($post_meta_cache[$id]) ) { 199 199 return $post_meta_cache[$id]; 200 200 } else { 201 echo 'dbing'; 201 202 if ( $meta_list = $wpdb->get_results("SELECT post_id, meta_key, meta_value FROM $wpdb->postmeta WHERE post_id = '$id' ORDER BY post_id, meta_key", ARRAY_A) ) { 202 203 // Change from flat structure to hierarchical: 203 204 $post_meta_cache = array(); … … 234 235 function get_post_custom_values($key='') { 235 236 global $id, $post_meta_cache; 236 237 237 return $post_meta_cache[$id][$key]; 238 if (empty($key)) { 239 return $post_meta_cache[$id]; 240 } else { 241 return get_post_custom(); 242 } 238 243 } 239 244 240 245