Changeset 8824
- Timestamp:
- 09/05/08 22:04:04 (3 months ago)
- Files:
-
- trunk/wp-includes/post.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/post.php
r8796 r8824 593 593 $meta_cache = wp_cache_get($post_id, 'post_meta'); 594 594 595 if ( !$meta_cache ) { 596 update_postmeta_cache($post_id); 597 $meta_cache = wp_cache_get($post_id, 'post_meta'); 598 } 599 595 600 if ( isset($meta_cache[$key]) ) { 596 601 if ( $single ) { 597 602 return maybe_unserialize( $meta_cache[$key][0] ); 598 603 } else { 599 return maybe_unserialize( $meta_cache[$key] ); 600 } 601 } 602 603 if ( !$meta_cache ) { 604 update_postmeta_cache($post_id); 605 $meta_cache = wp_cache_get($post_id, 'post_meta'); 606 } 607 608 if ( $single ) { 609 if ( isset($meta_cache[$key][0]) ) 610 return maybe_unserialize($meta_cache[$key][0]); 611 else 612 return ''; 613 } else { 614 return maybe_unserialize($meta_cache[$key]); 615 } 604 return array_map('maybe_unserialize', $meta_cache[$key]); 605 } 606 } 607 608 return ''; 616 609 } 617 610
