Ticket #7623: 7623.diff
| File 7623.diff, 978 bytes (added by andy, 4 years ago) |
|---|
-
trunk/wp-includes/post.php
578 578 579 579 $meta_cache = wp_cache_get($post_id, 'post_meta'); 580 580 581 if ( !$meta_cache ) { 582 update_postmeta_cache($post_id); 583 $meta_cache = wp_cache_get($post_id, 'post_meta'); 584 } 585 581 586 if ( isset($meta_cache[$key]) ) { 582 587 if ( $single ) { 583 588 return maybe_unserialize( $meta_cache[$key][0] ); 584 589 } else { 585 return maybe_unserialize( $meta_cache[$key]);590 return array_map('maybe_unserialize', $meta_cache[$key]); 586 591 } 587 592 } 588 593 589 if ( !$meta_cache ) { 590 update_postmeta_cache($post_id); 591 $meta_cache = wp_cache_get($post_id, 'post_meta'); 592 } 593 594 if ( $single ) { 595 if ( isset($meta_cache[$key][0]) ) 596 return maybe_unserialize($meta_cache[$key][0]); 597 else 598 return ''; 599 } else { 600 return maybe_unserialize($meta_cache[$key]); 601 } 594 return ''; 602 595 } 603 596 604 597 /**
