Ticket #19708: 19708-2.diff
| File 19708-2.diff, 1.2 KB (added by leewillis77, 17 months ago) |
|---|
-
wp-includes/post.php
1508 1508 /** 1509 1509 * Retrieve post meta fields, based on post ID. 1510 1510 * 1511 * The post meta fields are retrieved from the cache , so the function is1512 * optimized to be called more than once. It also applies to the functions, that1513 * use this function.1511 * The post meta fields are retrieved from the cache where possible, so the 1512 * function is optimized to be called more than once. It also applies to the 1513 * functions, that use this function. 1514 1514 * 1515 1515 * @since 1.2.0 1516 1516 * @link http://codex.wordpress.org/Function_Reference/get_post_custom … … 1526 1526 if ( ! $post_id ) 1527 1527 $post_id = get_the_ID(); 1528 1528 1529 if ( ! wp_cache_get( $post_id, 'post_meta' ) ) 1530 update_postmeta_cache( $post_id ); 1529 if ( ! wp_cache_get( $post_id, 'post_meta' ) ) { 1531 1530 1532 return wp_cache_get( $post_id, 'post_meta' ); 1531 $post_meta = update_postmeta_cache( $post_id ); 1532 1533 if ( ! $post_meta ) 1534 return $post_meta; 1535 1536 $post_meta = $post_meta [ $post_id ]; 1537 1538 return $post_meta; 1539 1540 } else { 1541 1542 return wp_cache_get( $post_id, 'post_meta' ); 1543 1544 } 1545 1533 1546 } 1534 1547 1535 1548 /**
