Ticket #19708: 19708.3.diff
| File 19708.3.diff, 1.1 KB (added by duck_, 16 months ago) |
|---|
-
wp-includes/post.php
1513 1513 /** 1514 1514 * Retrieve post meta fields, based on post ID. 1515 1515 * 1516 * The post meta fields are retrieved from the cache, so the function is 1517 * optimized to be called more than once. It also applies to the functions, that 1518 * use this function. 1516 * The post meta fields are retrieved from the cache where possible, 1517 * so the function is optimized to be called more than once. 1519 1518 * 1520 1519 * @since 1.2.0 1521 1520 * @link http://codex.wordpress.org/Function_Reference/get_post_custom 1522 1521 * 1523 * @uses $id Current Loop Post ID 1524 * 1525 * @param int $post_id post ID 1522 * @param int $post_id Post ID. 1526 1523 * @return array 1527 1524 */ 1528 1525 function get_post_custom( $post_id = 0 ) { 1529 1526 $post_id = absint( $post_id ); 1530 1531 1527 if ( ! $post_id ) 1532 1528 $post_id = get_the_ID(); 1533 1529 1534 if ( ! wp_cache_get( $post_id, 'post_meta' ) ) 1535 update_postmeta_cache( $post_id ); 1536 1537 return wp_cache_get( $post_id, 'post_meta' ); 1530 return get_post_meta( $post_id, '' ); 1538 1531 } 1539 1532 1540 1533 /**
