Changeset 946 for trunk/wp-blog-header.php
- Timestamp:
- 02/26/2004 09:42:47 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r945 r946 449 449 } 450 450 451 // Get post-meta info 452 if ( $meta_list = $wpdb->get_results(" 453 SELECT post_id,meta_key,meta_value 454 FROM $tablepostmeta 455 WHERE post_id IN($post_id_list) 456 ORDER BY post_id,meta_key 457 ", ARRAY_A) ) { 458 459 // Change from flat structure to hierarchical: 460 $post_meta_cache = array(); 461 foreach ($meta_list as $metarow) { 462 $mpid = $metarow['post_id']; 463 $mkey = $metarow['meta_key']; 464 $mval = $metarow['meta_value']; 465 466 // Force subkeys to be array type: 467 if (!is_array($post_meta_cache[$mpid])) 468 $post_meta_cache[$mpid] = array(); 469 if (!is_array($post_meta_cache[$mpid][$mkey])) 470 $post_meta_cache[$mpid][$mkey] = array(); 471 472 // Add a value to the current pid/key: 473 $post_meta_cache[$mpid][$mkey][] = $mval; 474 } 475 } 476 477 451 478 if (1 == count($posts)) { 452 479 if ($p || $name) {
Note: See TracChangeset
for help on using the changeset viewer.